Saturday, June 29, 2013

Write a program to whether the given character is vowel or not?

Program:
#include<stdio.h>
#include<conio.h>

void main()
{
char c;
clrscr();
printf("\n enter the character ");
scanf("%c",&c);
switch(c)
{
case'a':
case'e':
case'i':
case'o':
case'u':
printf("\n the %c  is vowel",c);
break;
default:

printf("\n the %d  is consonant",c);
}

getch();
}

output:
image



Like the Post? Do share with your Friends.

No comments:

Post a Comment