• + 1 comment

    I used this code

    Scanner scanner = new Scanner(System.in);
            String sentence = scanner.nextLine();
            int count = 0;
            sentence = sentence.toLowerCase();
            
            //System.out.println(sentence.replaceAll("a",""));
            for (char ch = 'a'; ch <= 'z'; ch++) {
                 if (sentence.contains(Character.toString(ch))) {
                    count++;
                 }
            }
            
            if (count>=26){ 
                System.out.println ("pangram");
            }else{  
                System.out.println ("not pangram");
            }