Run ID:2755

提交时间:2024-01-22 14:54:48

#include<iostream> using namespace std; char vowel[11]={"aoeiuAOEIU"}; int casegap='a'-'A'; int main(){ int t; cin>>t; while(t--){ char c[50]; int i=0; bool d; cin>>c; while(c[i]!='\0'){ d=0; for(int j=0;j<10;j++){ if(c[i]==vowel[j]){ d=1; break; } } if(d){ if(c[i]>='a') c[i]=(char)(c[i]-casegap); }else{ if(c[i]<='Z') c[i]=(char)(c[i]+casegap); } i++; } for(int j=0;c[j]!='\0';j++) cout<<c[j]; cout<<endl; } return 0; }