forked from rajatgoyal715/Hackerrank
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPangrams.java
More file actions
33 lines (29 loc) · 743 Bytes
/
Pangrams.java
File metadata and controls
33 lines (29 loc) · 743 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
/*
* Add any license header using tools << templates << licenses << default license
*/
package Strings;
import java.util.Scanner;
/**
* @author mukul goyal
*/
public class Pangrams {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s1 = sc.nextLine();
String s = s1.toLowerCase();
int flag=0;
int l = s.length();
for(int i=0;i<26;i++){
flag=0;
for(int j=0;j<l;j++){
if(s.charAt(j)==97+i){
flag = 1;
break;
}
}
if(flag==0)
break;
}
System.out.println((flag==1)?"pangram":"not pangram");
}
}