Advertisement
Guest User

Alphabet

a guest
Feb 16th, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. char ch = 'a';
  2.         while (ch <= 'z') {
  3.             if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u') {
  4.                 System.out.println(ch + " is a vowel");
  5.             } else {
  6.                 System.out.println(ch + " is a consonant");
  7.             }
  8.             ch++;
  9.         }
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement