Computer Science, asked by gamingqwertypoiuy, 1 month ago

USA JAVA WAP to enter a character. Check and print whether it is an uppercase vowel or not.(Make use of if statement) *​

Answers

Answered by ArpitMishra506
0

import java.util.Scanner;

public class Vowel {

public static void main(String args[]){

Scanner scn = new Scanner(System.in);

System.out.print("Enter a character : ");

char ch = scn.next().charAt(0);

if(ch == 'A' || ch == 'E' || ch == 'I' || ch == 'O' || ch == 'U')

System.out.println(" It is a uppercase vowel. ");

else if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')

System.out.println(" It is a lowercase vowel. ");

else

System.out.println(" It is not a vowel. ");

scn.close();

}

}

.

.

.

.

HOPE THIS HELPS YOU

Similar questions