Computer Science, asked by wankhederuchita, 5 months ago

E
Checking alphabets
Lucy Pevensie and her brothers Peter and Edmund found themselves in Narnia, the land of magic
during the World War III Narnia was completely filled with gentle people and also it is where the trees
sing, fauns dance and animals talk. Being from England, Lucy wanted to teach the kids, English
language She started teaching them alphabets but then she remembered that she might go back to
London and felt sad. Edmund and Peter discussed with each other and suggested an idea to Lucy to
come up with a program so that the kids can learn on their own when she was not there. Can you help
Lucy to write a C-+program to check whether the given character is a vowel or consonant.
Mee
INPUT & OUTPUT FORMAT:
The input consists of a character,
The output should be any one of the below-given strings.
Han
"Vowel" or "Consonant" or "Not an alphabet".
cu
SAMPLE INPUT & OUTPUT:
Comp
Vowel​

Answers

Answered by Naisha28
0
Can you please repost your question briefly. It’s too lengthy
Answered by rohitsharmajr
0

Answer:#include<iostream>

using namespace std;

int main()

{

 char n;

 cin>>n;

 if(isalpha(n)){

 if(n=='a'||n=='e'||n=='i'||n=='o'||n=='u'||n=='A'||n=='E'||n=='I'||n=='O'||n=='U'){

     cout<<"Vowel";

   }else {

    cout<<"Consonant";

 }

 }else{

     

       cout<<"Not an alphabet";

 }

 

 return 0;

}

Explanation:

Similar questions