Monday, 4 May 2015

check Vowel in c program

Program

#include<stdio.h>
void main()
{
char ch;
printf("Enter the character :");
scanf("%c",&ch);
if(ch=='a'||ch=='A'||ch=='e'||ch=='E'||ch=='i'||ch=='I'||ch=='o'||ch=='O'||ch=='U'||ch=='u')
{
printf("it's vowel of :%c",ch);
}
else
{
printf("it's not vowel of :%c",ch);
}

output

Enter the character :ant
it's vowel of :a

Enter the character :road
it's not vowel of :r


No comments:

Post a Comment