forked from ambujraj/hacktoberfest2018
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpangram__java
More file actions
34 lines (25 loc) · 750 Bytes
/
pangram__java
File metadata and controls
34 lines (25 loc) · 750 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
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
public class Pangram {
public static void main(String args[]) {
try {
final String str;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
str = br.readLine().toLowerCase().replaceAll(" ", "");
char[] chars = str.toCharArray();
final Set set = new HashSet();
for(char c: chars){
set.add(c);
}
System.out.println(set.size());
if(set.size() == 26)
System.out.println("pangram");
else
System.out.println("not pangram");
} catch (Exception e) {
e.printStackTrace();
}
}
}