Answer to Question #256833 in C++ for mae

Question #256833
write a program that determines if the input letter is a VOWEL or CONSONANT.The vowels are:A E I O U.your program must be able to handle a capital or small input letter.
1
Expert's answer
2021-10-27T00:48:06-0400
#include <iostream>
using namespace std;
int main()
{
    char c;
    cout << "Enter a letter: ";
    cin >> c;
    if(c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U' || c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u'){
        cout << "The letter  "<<c<<" is a vowel ";
    }
    else{
        cout << "The letter "<<c<<" is a constant ";


    }
    return 0;
}

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

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS