fork download
  1. #include<stdio.h>
  2. #include<string.h>
  3. #define zero '0'
  4. #define ten 'A'
  5. #define point '.'
  6. #define blanc ' '
  7.  
  8. void strcat_c (char *str, char c)
  9. {
  10. for (;*str;str++); // note the terminating semicolon here.
  11. *str++ = c;
  12. *str++ = 0;
  13. }
  14.  
  15. int main(void){
  16. int i=1,n=0; char c=' ';
  17. char *result[100];
  18.  
  19. while(i!=EOF){
  20. result[0]='\0';
  21.  
  22. while(i!=EOF&&(c<zero||c>ten)){
  23. i=getchar(); c=i;
  24. }
  25.  
  26. while(i!=EOF&&c>=zero&&c<=ten){
  27.  
  28. strcat_c(result,c);
  29. i=getchar(); c=i;
  30. n++;
  31. }
  32.  
  33. if(i!=EOF){
  34. // for (int i = 0; i<n; i++) {
  35. printf("%s",result);
  36. // }
  37. }
  38. } //while EOF
  39. return 0;
  40. } //main
Success #stdin #stdout 0s 4188KB
stdin
123
stdout
Standard output is empty