Rewrite the following switch case construct using it else construct.
char c
switch )
case 'a
case 'e
case: case o
case v System.out.println("Vowel")
break
default: System.out.println("Not a vowel):
Answers
Answered by
2
Answer:
if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u')
System.out.println("Vowel");
else
System.out.println("Not a vowel);
Similar questions