fork download
  1. #include <stdio.h>
  2. #include <ctype.h>
  3. int main() {
  4. char str[100];
  5. fgets(str, 100, stdin);
  6. int i = 0;
  7. while (str[i]) {
  8. if (i == 0 || str[i-1] == ' ') {
  9. str[i] = toupper(str[i]);
  10. }
  11. i++;
  12. }
  13. printf("%s", str);
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5272KB
stdin
Standard input is empty
stdout
�o$2�