Write a java program using Scanner class.
Enter a character from the user .Find and display whether it is an uppercase vowel or a lowercase vowel or a constant.
Answers
Answered by
2
The program is written in JAVA and all the instructions are followed::
import java.util.Scanner;
Public class Brainly {
public static void main(String [] args) {
Scanner sc = new Scanner(System.in);
char input = sc.nextChar();
if (input == a || input == e || input == i || input == o || input == u) {
System.out.println("lowercase vowel");
}
else if (input == A || input == E || input == I || input == U) {
System.out.println("Uppercase vowel");
}
else {
System.out.println("Consonant");
}
}
}
[tex]\green{ \boxed{ \mathfrak{logic : }}}[\tex]
==>It checks if it is vowel by using conditional statements(if... else if... else).
Hope this helps you..♪
Answered by
0
Explanation:
Ok telling wait for a few minutes
Similar questions