-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapcpg198q3.java
33 lines (31 loc) · 876 Bytes
/
apcpg198q3.java
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
import java.io.*;
class apcpg198q3
{
public static void main ()throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String name;
int up,low,digit;int p;
char chr;
System.out.println("enter the string");
name=br.readLine();
p=name.length();
for(int i=0;i<p;i++)
{
chr=name.charAt(i);
if(chr>='A' && chr<='Z'){
System.out.println("capital");
}
else if(chr>='a' && chr<='z') {
System.out.println("small");
}
else if(chr>='0'&& chr<='9')
{
System.out.println("digit");
}
else
{
System.out.println("special character");
}
}
}}