Write a java program, take a char as input and test it vowel or not using conditional operator
Answers
Answered by
0
public class VowelConsonant {
public static void main(String[] args) {
char ch = 'i';
if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' )
System.out.println(ch + " is vowel");
else
System.out.println(ch + " is consonant");
}
}
Similar questions