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