Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
114088 小徐老师 元音字母转换 C++ Accepted 1 MS 264 KB 531 2025-03-19 21:18:02

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; char a[55]; char b[10] = {'a', 'e', 'i', 'o', 'u'}; int main() { int n; cin >> n; while(n--) { cin >> a; for(int i = 0; i < strlen(a); ++i) { if(a[i] >= 'A' && a[i] <= 'Z') a[i] = a[i] + 32; for(int j = 0; j < 5; ++j) { if(a[i] == b[j]) a[i] = a[i] - 32; } } cout << a << endl; } return 0; }