Vowels finding program in C/ C++
#include <stdio.h>
int main(){ char x;
printf(“Input a character\n”);
scanf(“%c”, &x);
switch(x) {
case ‘a’:
case ‘A’:
case ‘e’:
case ‘E’:
case ‘i’:
case ‘I’:
case ‘o’:
case ‘O’:
case ‘u’:
case ‘U’:
printf(“%c is a vowel.\n”, x);
break;
default:
printf(“%c is not a vowel.\n”, x);
}
return 0;
}

Leave a reply