C programming examples with output:
Find vowel or not
Program
#include<stdio.h>
#include<conio.h>
main()
{
char ch;
clrscr();.
printf("Enter any charecter: ");
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':
prinntf)'%c is a vowel",ch);
break;
case 'U':
printf("%c is a vowel",ch);
break;
default:
printf("%c is not a vowel",ch);
}
getch();
}
Output
Enter any character: a
a is a vowel
Enter any character: x
x is not a vowel
0 komentar:
Post a Comment