Computer Science, asked by neelusharma3579, 4 hours ago

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 purveshKolhe
2

 \green{ \boxed{ \mathfrak{answer : }}}

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 aurangebazam2008
0

Explanation:

Ok telling wait for a few minutes

Similar questions