Computer Science, asked by nameerjaved144, 11 months ago

WAP to assign a char check and print whether it is a vowel or not
.
.
.
.
if u give the ans u receive 20 point​

Answers

Answered by sahasuparno
0

import java.util.*;

class vowel{

public static void main(){

Scanner sc=new Scanner(System.in);

System.out.println("Enter a character");

char a =sc.next()charAt(0);

if (a=='a'||a=='e'||a=='i'||a=='o'||a=='u'){

System.out.println(a+"is a vowel");

}

else{

System.out.println("not character");

}

}

}

Similar questions