fork download
  1. #include<iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6. int i;
  7. cin >> i;
  8. while(i != 42){
  9. cout << i << endl;
  10. cin >> i;
  11. }
  12. }
Success #stdin #stdout 0s 4548KB
stdin
1
2
88
42
99
stdout
1
2
88