fork download
  1. #include <stdio.h>
  2. #define SIZE 10
  3. void main()
  4. {
  5. char c;
  6. int i=-1, j;
  7. int num[SIZE];
  8. do
  9. {
  10. i++;
  11. scanf("%d%c", &num[i], &c);
  12. }
  13. while(num[i]!=0);
  14. for(j=0;j<i;j++)
  15. printf("%d ", num[j]);
  16. putchar('\n');
  17.  
  18.  
  19. }
Runtime error #stdin #stdout 0s 2164KB
stdin
1 2 3 4 0
stdout
1 2 3 4