提交时间:2019-12-28 15:08:44
运行 ID: 4033
#include<iostream> using namespace std; int main(){ int n; char cer[606]; scanf("%d%*c",&n); for(int m=1;m<=n;m++){ gets(cer); int i=0; int bar=0; while(cer[i]!='\0'){ if(cer[i]!=' '&&bar==0){ if(cer[i]>='a') printf("%c",cer[i]-32); else printf("%c",cer[i]); bar++; } if(cer[i]==' ') bar=0; i++; } cout<<endl; } return 0; }