fork download
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. { int k;
  5. while(scanf("%d\n",&k)!=EOF)
  6. {
  7. if(k==42)break;
  8. cout<<k<<endl;
  9. }
  10. return 0;
  11. }
Success #stdin #stdout 0s 15240KB
stdin
1
2
3
42
44
stdout
1
2
3