1165:0 starting point algorithm 72--initial capitalization time limit:1 Sec Memory limit:64 MB 64bit IO Format:%lld
submitted:705 accepted:439
[Submit] [Status] [Web Board] Description
Enter an English sentence and change the first letter of each word to uppercase.
Input
The input data contains multiple test instances, each of which is a line of English sentences with a length of not more than 100.
Output
Please output the English sentences that have been rewritten as required.
Sample Input
I like ACMI want to get an accepted
Sample Output
I like AcmI want to Get an Accepted
Source
0 Starting point Learning algorithm
1#include <stdio.h>2 intMain () {3 Chara[ -];4 while(Gets (a)! =NULL) {5a[0]+='A'-'a';6 for(intI=1; a[i]!=' /'; i++){7 if(a[i]==' ') a[++i]+='A'-'a';8 }9 puts (a);Ten } One return 0; A}
1165:0 starting point algorithm 72--first letter capitalization