提交时间:2019-12-27 19:34:06
运行 ID: 3911
#include<iostream> using namespace std; int main(){ int n; char a[51]; scanf("%d%*c",&n); while(n--){ gets(a); int i=0; while(a[i]!='\0'){ if(a[i]=='A'||a[i]=='a'||a[i]=='E'||a[i]=='e'||a[i]=='I'||a[i]=='i'||a[i]=='O'||a[i]=='o'||a[i]=='U'||a[i]=='u'){ if(a[i]>='a') a[i]=a[i]-32; }else if((a[i]>='A'&&a[i]<='Z')||(a[i]>='a'&&a[i]<='z')){ if(a[i]<'a') a[i]=a[i]+32; } i++; } puts(a); } return 0; }