+ 2

Using Logical OR and if statement

To write a program using c++ that will use logical OR and of statement to indicate whether a character read from keyboard is an English vowel or not

22nd Apr 2017, 4:56 PM
olamilekan
olamilekan - avatar
4 Answers
+ 21
Do it!...
22nd Apr 2017, 5:02 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 9
char c; cin >> c; if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' ){ cout<< c << " is vowel letter."<< endl; }else{ cout<< c << " is not vowel letter. }
22nd Apr 2017, 5:07 PM
Mohammad Dakdouk
Mohammad Dakdouk - avatar
+ 5
What Mohammad said is true and I just add that You can also use switch case for that purpose.
22nd Apr 2017, 5:16 PM
Alireza M
Alireza M - avatar