Computer Science, asked by moniverma97521, 7 months ago

Write a program to take input of an alphabet and print it is a vowel or not (using switch case )

Answers

Answered by alex57
1

Answer:

I will use c++ as a languages.

Just take an input from the user and check using one by one of you want switch case.

Explanation:

#include <iostream>

using namespace std;

int main()

{

char c;

cin>>c;

switch(c)

{

case 'a' :

{

cout <<"It is a vowel";

break;

}

case 'e' :

{

cout <<"It is a vowel";

break;

}

case 'i' :

{

cout <<"It is a vowel";

break;

}

case 'o' :

{

cout <<"It is a vowel";

break;

}

case 'u' :

{

cout <<"It is a vowel";

break;

}

default :

{

cout <<"It is a not vowel";

}

return 0:

}

Similar questions