知识点:
分支控制:分支控制
#include <iostream> using namespace std; int main() { char ch = ' '; string s("AEIOUaeiou"); while (cin >> ch) { if (s.find(ch) != -1) { cout << "Vowel" << endl; } else { cout << "Consonant" << endl; } } return 0; }
知识点:
分支控制:分支控制
#include <iostream> using namespace std; int main() { char ch = ' '; string s("AEIOUaeiou"); while (cin >> ch) { if (s.find(ch) != -1) { cout << "Vowel" << endl; } else { cout << "Consonant" << endl; } } return 0; }