http://acm.hdu.edu.cn/showproblem.php?pid=2026
#include<iostream>
using namespace std;
int main()
{
char ch[100];
bool flag=0;
char f;
while(gets(ch)){
int len=strlen(ch);
f=ch[0]-32;
cout<<f;
for(int i=1;i<len;i++){
if(flag==1){
f=ch[i]-32;
cout<<f;
flag=0;
}
else cout<<ch[i];
if(ch[i]==' ') flag=1;
}
cout<<endl;
}
}