We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fad8d5 commit c8f8915Copy full SHA for c8f8915
Test12_vowel_or_Consonant.java
@@ -0,0 +1,41 @@
1
+package com.test.Basic_Java_Programs;
2
+
3
+import java.util.Scanner;
4
5
+public class Test12_vowel_or_Consonant
6
+{
7
+ public static void main(String[] args)
8
+ {
9
+ char ch;
10
11
+ System.out.print("Enter Character : ");
12
13
+ Scanner sc = new Scanner(System.in);
14
15
+ ch = sc.next().charAt(0);
16
17
+ if (ch =='a' || ch== 'e' ||ch=='i' || ch=='o' || ch=='u')
18
19
+ System.out.println("Vowels");
20
+ }
21
+ else
22
23
+ System.out.println("Consonant");
24
25
26
27
28
+}
29
30
31
+/* Output:
32
33
34
+ Enter Character : a
35
+Vowels
36
37
38
39
40
41
+*/
0 commit comments