提交时间:2019-12-22 19:14:27

运行 ID: 3838

#include<iostream> #include<string> int main() { using namespace std; int n; cin >> n; for (int i = 0; i < n; i++) { cin >> tmp; for (int j = 0; j < tmp.size(); j++) { if (tmp[j] == 'a' || tmp[j] == 'e' || tmp[j] == 'i' || tmp[j] == 'o' || tmp[j] == 'u') tmp[j] -= 32; else if ((tmp[j]>='a' && tmp[j]<='z')||tmp[j] == 'A' || tmp[j] == 'E' || tmp[j] == 'I' || tmp[j] == 'O' || tmp[j] == 'U') continue; else tmp[j] += 32; } cout<<tmp<<endl; } return 0; }