C programming
int main()
{
char c;
printf("Enter an alphabet :\n");
scanf("%c", &c);
if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' ||
c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U')
{
printf("\n %c is VOWEL.", c);
}
else
{
printf("\n %c is CONSONANT.\n", c);
}
return 0;
}
Try it Yourself ➠
Alphabet is Vowel or Consonant in C
14 May
0
Write a program (WAP) in C to read two numbers from keyboard(User Input) to know a character is vowel or consonant.
#include <stdio.h>int main()
{
char c;
printf("Enter an alphabet :\n");
scanf("%c", &c);
if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' ||
c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U')
{
printf("\n %c is VOWEL.", c);
}
else
{
printf("\n %c is CONSONANT.\n", c);
}
return 0;
}
Try it Yourself ➠
Must Read :-
Previous article
Next article
Leave Comments
Post a Comment