-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA55.java
More file actions
41 lines (36 loc) · 852 Bytes
/
A55.java
File metadata and controls
41 lines (36 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import java.util.Scanner;
class A55
{
public static void main(String[] args)
{
Scanner s = new Scanner(System.in);
char ch = s.next().charAt(0);
if(ch>='A' && ch<='Z')
{
if (ch=='A' || ch=='E' || ch=='I' || ch=='O' || ch=='U' )
{
System.out.println("Ch is Upper Case and a vowel");
}
else {
System.out.println("Ch is Upper Case and a consonant");
}
}
if(ch>='a' && ch<='z')
{
if (ch=='a' || ch=='e' || ch=='i' || ch=='o' || ch=='u' )
{
System.out.println("Ch is Lower Case and a vowel");
}
else {
System.out.println("Ch is lower Case and a consonant");
}
}
else if (ch>='0' && ch<='9')
{
System.out.println("Ch is a number");
}
else{
System.out.println("Ch is a special character");
}
}
}