fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int x,y;
  5. for(; scanf("%d",&x) > 0 && x != 42; printf("%d\n", x));
  6. for(; scanf("%d",&y) > 0 && y != 42; printf("%d\n", y));
  7. return 0;
  8. }
Success #stdin #stdout 0s 5320KB
stdin
10
20
30
40
stdout
10
20
30
40