write a program in c++ to input a single character and print a message"it is a vowel "if it is vowel otherwise print message "it is a consonant".use if-else structure and or (||)operator only
1
Expert's answer
2011-11-03T11:58:34-0400
#include<iostream> #include<conio.h> main(){ char n[1]; cout<<"\nEnter a character: "; cin>>n[0]; if ((n[0]=='a')||(n[0]=='e')||(n[0]=='i')||(n[0]=='o')||(n[0]=='u')) cout<<"It is a vowel"; else cout<<"It is a consonant"; getch(); }
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
You're welcome. We are glad to be helpful. If you really liked our service please press like-button beside answer field. Thank you!
thank u so much it was so help full
Leave a comment