#include <bits/stdc++.h>
using namespace std;
int t;
string s;
int main()
{
while(scanf("%d",&t)!=EOF)
{
cin>>s;
cout<<(char)(s[0]-32);
int n=s.length();
for(int i=1;i<=n;i++)
{
if(s[i]==' ')
printf("%c",(char)(s[i+1]-32));
else continue;
}
printf("\n");
}
return 0;
}
输入↓
1
end of file
输出↓
E
O
F
为什么在执行for循环时会执行for循环之外的东西