switch case vowels and consonants by using OR operator

Switch case vowels and consonants by using OR operator


#include
#include
main()
{
char x;
clrscr();
printf("Enter the charecter");
scanf("%c",&x);
if(x=='a'||'e'||'i'||'o'||'u')
printf("is vowel");
else
printf("is consonant");
getch();
}



No comments:

Post a Comment