64 648
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #4943 in C++ for zuhaib abbasi

Question #4943
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
Expert's answer
#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();
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
19.11.12, 16:03

You're welcome. We are glad to be helpful.
If you really liked our service please press like-button beside answer field. Thank you!

pari
17.11.12, 13:10

thank u so much it was so help full

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions