Check vowels using if....else statement
/*WAP to check
vowels using if....else statement*/
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("enter
the character:");
scanf("%c",&ch);
if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u'||ch=='A'||ch=='E'||ch=='I' ||ch=='O'||ch
=='U')
printf("%c
is vowel",ch);
else
printf("%c
is not a vowel",ch);
getch();
}
OUTPUT:
enter the
character:r
r is not a vowel
No comments:
Post a Comment