Question: Convert the following c code to switch case statements. C Format please... int main() { char ch; printf(Enter any alphabet:); //input alphabet from user scanf(%c,

Convert the following c code to switch case statements. C Format please...

int main()

{ char ch;

printf("Enter any alphabet:"); //input alphabet from user

scanf("%c", &ch);

if(ch=='a'|| ch=='A')

printf("Vowel");

else if((ch=='e'|| ch=='E'))

printf("Vowel");

else if((ch=='i'|| ch=='I'))

printf("Vowel");

else if((ch=='u'|| ch=='U'))

printf("Vowel");

else if((ch=='o'|| ch=='O'))

printf("Vowel");

else printf("Consonant");

return 0; }

C format please...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!