Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
281 关清声 元音字母转换 C++ Presentation Error 0 MS 268 KB 452 2022-08-01 16:11:40

Tests(0/1):


Code:

#include<iostream> #include<cstring> using namespace std; int main() { int n; cin>>n; for(int i=0;i<n+1;i++) { string x; getline(cin,x); for(int l=0;l<x.size();l++) { if('A'<=x[l]&&x[l]<='Z') { x[l]+=' '; } } for(int l=0;l<x.size();l++) { if(x[l]=='a'||x[l]=='e'||x[l]=='i'||x[l]=='o'||x[l]=='u') { x[l]-=' '; } } cout<<x; if(i!=n) { cout<<endl; } } return 0; }