//Check whether alphabet is vowel or not
#include <stdio.h>
#include <conio.h>
void main()
{
char ch;
clrscr();
printf("Enter any character\n");
scanf("%c", &ch);
//|| stands for or
if (ch == 'a' || ch == 'A' || ch == 'e' || ch == 'E' || ch == 'i' || ch == 'I' || ch =='o' || ch=='O' || ch == 'u' || ch == 'U')
printf("%c is a vowel.\n", ch);
else
printf("%c is not a vowel.\n", ch);
getch();
}
#include <stdio.h>
#include <conio.h>
void main()
{
char ch;
clrscr();
printf("Enter any character\n");
scanf("%c", &ch);
//|| stands for or
if (ch == 'a' || ch == 'A' || ch == 'e' || ch == 'E' || ch == 'i' || ch == 'I' || ch =='o' || ch=='O' || ch == 'u' || ch == 'U')
printf("%c is a vowel.\n", ch);
else
printf("%c is not a vowel.\n", ch);
getch();
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.