fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int a;
  7. while(1) {
  8. cin>>a;
  9. if(a==42) break;
  10. else cout<<a<<endl;}
  11. return 0;
  12. }
Success #stdin #stdout 0s 3300KB
stdin
1
2
45
98
56565
42
stdout
1
2
45
98
56565