Problem : 2026 ( 首字母变大写 ) Judge Status : Accepted
RunId : 6000786 Language : C Author : qq1203456195
Code Render Status : Rendered By HDOJ C Code Render Version 0.01 Beta
RunId : 6000786 Language : C Author : qq1203456195
Code Render Status : Rendered By HDOJ C Code Render Version 0.01 Beta
1 #include <stdio.h> 2 int main() 3 { 4 int n,i,f; 5 char str[101]; 6 while (gets(str)!=NULL) 7 { 8 i=0;f=1; 9 while (str[i]!='\0') 10 { 11 if (f==1) 12 { 13 printf("%c",str[i]-32); 14 f=0; 15 } 16 else 17 { 18 printf("%c",str[i]); 19 } 20 i++; 21 if(str[i]==' ') 22 { 23 printf(" "); 24 f=1; 25 i++; 26 } 27 } 28 printf("\n"); 29 } 30 return 0; 31 }