提交时间:2019-12-27 22:05:24

运行 ID: 4022

#include<iostream> using namespace std; int main(){ int n; char qq[60]; scanf("%d%*c",&n); while(n--){ gets(qq); int i=0; while(qq[i]!='\0'){ if(qq[i]=='A'||qq[i]=='O'||qq[i]=='I'||qq[i]=='U'||qq[i]=='E'||qq[i]=='a'||qq[i]=='o'||qq[i]=='i'||qq[i]=='u'||qq[i]=='e'){ if(qq[i]>='a'){ qq[i]=qq[i]-32; } }else{ if((qq[i]>='A'&&qq[i]<='Z')||(qq[i]>='a'&&qq[i]<='z')){ if(qq[i]< 'a'){ qq[i]=qq[i]+32; } } } i++; } puts(qq); } return 0; }