Wednesday 30 January 2013

vowel or not in c++

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
char n;
cout<<"enter the alphabet"<<endl;
cin>>n;
switch(n)
{case 'a':
case 'A':
cout<<"vowel";
break;
case 'e':
case 'E':
cout<<"vowel";
break;
case 'i':
case 'I':
cout<<"vowel";
break;
case 'o':
case 'O':
cout<<"vowel";
break;
case 'u':
case 'U':
cout<<"vowel";
break;
default:
cout<<"not vowel";
break;}
getch();}

0 comments:

Post a Comment