fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. int main(void)
  6. {
  7. char str[60] = {0}, marks[6] = "12345";
  8. //char* ptr = strpbrk(str, marks);
  9. char chr[2] = {0};
  10. int i = 0;
  11.  
  12. for(; chr[0] != ' '; ++i) {
  13. scanf("%c", &chr[0]);
  14. strcat(str, chr);
  15. }
  16.  
  17. str[i] = ':';
  18. str[i+1] = ' ';
  19.  
  20. puts(str);
  21.  
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0.01s 5288KB
stdin
Туполев 5 5 5 4 5 5 3 4
stdout
Туполев :