Computer Science, asked by mdhalim1947, 1 month ago

Write a java program, take a char as input and test it vowel or not using conditional operator​

Answers

Answered by bakrihullisantosh
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