To check a letter is Vowel or not using C programming
just copy the bellow code and paste it to your TurboC software. And then run the program.
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("enter any charcter : ");
scanf("%c",&ch);
switch(ch)
{
case 'A' :
printf("%c is a vowel",ch);
break;
case 'E' :
printf("%c is a vowel",ch);
break;
case 'I' :
printf("%c is a vowel",ch);
break;
case 'o' :
printf("%c is a vowel",ch);
break;
case 'u' :
printf("%c is a vowel",ch);
break;
default:
printf("%c is not a vowel",ch);
}
getch();
}
0 comments:
Post a Comment