1 #include <stdio.h>
 2 #include <string.h>
 3 #include <ctype.h>
 4 #define N 100
 5 int main()
 6 {
 7     char str[N];
 8     int i;
 9     while (gets(str))
10     {
11         str[strlen(str)] = '\0';
12         for (i = 0; i < strlen(str); i++)
13         {
14             if (i == 0 || (str[i-1] == ' ' && (str[i] >= 'a' && str[i] <= 'z')))
15             {
16                 str[i] = toupper(str[i]);
17             }
18             putchar(str[i]);
19         }
20         putchar('\n');
21     }
22     return 0;
23 }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2021-10-01
  • 2022-12-23
  • 2021-08-09
  • 2022-01-01
猜你喜欢
  • 2021-10-18
  • 2021-08-28
  • 2022-12-23
  • 2022-02-18
  • 2021-05-24
  • 2021-09-14
相关资源
相似解决方案