A character is taken from user.. and is checked if it is a vowel or a consonant..
Select To use this code as it is.. select and copy paste this code into code.cpp file :)
- #include<iostream.h>
- #include<conio.h>
- void main()
- {
- clrscr();
- //Coding by: Snehil Khanor
- //http://WapCPP.blogspot.com
- char x;
- cout<<"Please enter a character: ";
- cin>>x;
- if(x=='a'||x=='A'||x=='e'||x=='E'||x=='i'||x=='I'||x=='o'||x=='O'||x=='u'||x=='U')
- cout<<x<<" is a Vowel :)";
- else
- cout<<x<<" is a consonant :)";
- getch();
- }
0 comments:
Post a Comment