Write a Program that accept a character & find whether it is a vowel

#include <stdio.h>
#include <conio.h>
void main ()
{
char ch;
clrscr();
printf("enter any character:- ");
scanf("%c",&ch);
if((ch=='a')||(ch=='e')||(ch=='i')||(ch=='o')||(ch=='u'))
{
printf("this is a vowel");
}
else
{
printf("this is not a vowel");
}
getch();
}

No comments:

Post a Comment

Related Post

Array:
String functions:
General (Loops-for/while)
Write a Program to print reverse of a given number Write a Program to print Product of Digits (eg. 212=2*1*2=4) of a given number Write a C++ Program to Convert Binary into Decimal Number