You are viewing a single comment's thread. Return to all comments →
Here is my java solution. It also only has one loop but it is a bit more simple.
Scanner in = new Scanner(System.in); String s = in.nextLine(); s = s.toLowerCase(); String hi = "abcdefghijklmnopqrstuvwxyz"; char letters[] = hi.toCharArray(); boolean isPangram = true; for(int i =0; i<hi.length(); i++){ if(s.contains(String.valueOf(letters[i]))==false){ isPangram = false; break; } } if(isPangram){ System.out.println("pangram"); } else{ System.out.println("not pangram"); }
Seems like cookies are disabled on this browser, please enable them to open this website
Pangrams
You are viewing a single comment's thread. Return to all comments →
Here is my java solution. It also only has one loop but it is a bit more simple.