Write a program to check the given character is vowel or not?
1
Expert's answer
2011-07-15T14:28:29-0400
#include <iostream> using namespace std;
int main() { char given_character; cout << "Please input a character: "; cin >> given_character;
bool vowel = false; switch (given_character) { & case 'a': case 'A': & case 'e': case 'E': & case 'o': case 'O': & case 'i': case 'I': & case 'u': case 'U': & vowel = true; } & & if (vowel) cout << "The given character is vowel." << endl; else& cout << "The given character isn't vowel." << endl; return 0; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment