C #include <stdio.h> #include <string.h> int main() { char s[100]; while (gets(s) != NULL) { s[0] -= 32; for (int i = 0; i < strlen(s); ++i) { if (s[i] == ' ') s[i + 1] -= 32; } puts(s); } return 0; }