FIND THE VOWEL CHARACTER USING C AND CPP
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
char a ;
cout<<"ENTER A
CHARACTeR,I WILL GIVE YOU A MIRACLE !";
cin>>a;
switch(a)
{
case'a':
case'A':cout<<"you
type vowel character";
break;
case'e':
case 'E':cout<<"you
type vowel character";
break;
case 'i':
case'I':cout<<"you
type a vowel character";
break;
case'o':
case'O' :cout<<"you
type a vowel character";
break;
case 'u':
case'U':cout<<"you
type a vowel character";
break;
default:cout<<"\n\nU
NEED TO TYPE vowel character only!";
}
getch();
}
OUTPUT:
ENTER A CHARACTER,I WILL GIVE YOU A MIRACLE !a
you type vowel character
ENTER A CHARACTOR,I WILL GIVE YOU A MIRACLE !S
YOU NEED TO TYPE vowel charactor only
No comments: