-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPangram.java
More file actions
28 lines (26 loc) · 732 Bytes
/
Pangram.java
File metadata and controls
28 lines (26 loc) · 732 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
import java.util.Scanner;
public class Pangram {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
int[] c = new int[26];
for (int i = 0; i < s.length(); i++) {
char ch = s.charAt(i);
if(ch>='A'&&ch<='Z')
c[ch-65]++;
else if(ch>='a'&&ch<='z'){
c[ch-97]++;
}
}
for (int i = 0; i < c.length; i++) {
if(c[i]==0){
System.out.println("its not a panagram");
break;
}
else{
System.out.println("its a panagram");
break;
}
}
}
}