fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. int main()
  6. {
  7. long nc;
  8. int c;
  9. int kc=1;
  10. for (kc=1;kc<=5;kc=kc+1)
  11. {
  12. char buf[10] = "";
  13. int idx = 0;
  14. nc=0;
  15. c= getchar();
  16. while(c != '0')
  17. {
  18. buf[idx++] = c;
  19. ++nc;
  20. c=getchar();
  21. }
  22.  
  23. printf("[%s] %1d\n",buf, nc);
  24. }
  25. return 0;
  26. }
  27.  
Runtime error #stdin #stdout 0.01s 1720KB
stdin
Standard input is empty
stdout
Standard output is empty