C Language - vowel checking program
#include <stdio.h>
#include <conio.h>
int main()
{
char vowel;
printf ("Enter a character to check whether it is vowel or not\n");
scanf ("%c", &vowel);
if (vowel=='A' || vowel=='a') {
printf (" %c is vowel.\n", vowel);
}
else if (vowel=='E' || vowel == 'e') {
printf (" %c is vowel.\n", vowel);
}
else if (vowel=='I' || vowel == 'i') {
printf (" %c is vowel.\n", vowel);
}
else if (vowel=='O' || vowel == 'o') {
printf (" %c is vowel.\n", vowel);
}
else if (vowel=='U' || vowel == 'u') {
printf (" %c is vowel.\n", vowel);
}
else {
printf ("Sorry! %c character is not vowel\n", vowel);
}
}
// ScreenShots:
Comments
Post a Comment