We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
importjava.io.*;importjava.util.*;importjava.text.*;importjava.math.*;importjava.util.regex.*;importjava.lang.*;publicclassSolution{publicstaticvoidmain(Stringargs[])throwsException{/* Enter your code here. Read input from STDIN. Print output to STDOUT */Scannerin=newScanner(System.in);Strings=in.nextLine().toLowerCase();Stringsmallchars="abcdefghijklmnopqrstuvwxyz";char[]smallcharsar=smallchars.toCharArray();booleanisPangrams=true;for(inti=0;i<smallcharsar.length;i++){if(s.indexOf(smallcharsar[i])>=0){continue;}else{isPangrams=false;break;}}if(isPangrams){System.out.println("pangram");}else{System.out.println("not pangram");}}}
Pangrams
You are viewing a single comment's thread. Return to all comments →
Java8