7891

陈棋  •  18天前


#include<bits/stdc++.h> 
using namespace std; 
bool isVowel(char c){ 
c=tolower(c); 
return c=='a'||c=='e'||c=='i'||c=='o'||c=='u'; 

int main(){ 
int T; 
cin>>T; 
while(T--){ 
 string s; 
 cin>>s; 
 string ans; 
 for(char ch : s){ 
  if(isVowel(ch)) 
   ans+=toupper(ch); 
  else 
   ans+=tolower(ch); 
 } 
 cout<<ans<<endl; 
}  
return 0; 
}


评论: