-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProblem29.java
More file actions
35 lines (28 loc) · 778 Bytes
/
Problem29.java
File metadata and controls
35 lines (28 loc) · 778 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
package dimikOJ;
import java.util.Scanner;
public class Problem29 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
int T = input.nextInt();
while (T < 1) {
T = input.nextInt();
}
input.nextLine();
char[] chars = new char[T];
for (int i = 0; i < chars.length; i++) {
chars[i] = input.nextLine().charAt(0);
}
for (char m : chars) {
if (m >= 97 && m <= 123) {
System.out.println("Lowercase Character");
} else if (m >= 65 && m <= 96) {
System.out.println("Uppercase Character");
} else if (m >= 48 && m <= 57) {
System.out.println("Numerical Digit");
} else {
System.out.println("Special Character");
}
}
}
}