/* wap to determine whether the entered chracter is consonant or vowel*/
#include
main()
{
char ch;
clrscr();
printf("\n Enter any character:");
scanf("%c",&ch);
switch(tolower(ch))
{
case 'a':
case 'e':
case 'i':
case 'o':
case 'u':
printf("\n The character is vowel!");
break;
default :
printf("\n The chracter is consonant!");
}
getch();
}
No comments:
Post a Comment