• Source
    1. #include <iostream>
    2.  
    3. using namespace std;
    4.  
    5. int main() {
    6.  
    7. while(true)
    8. {
    9. int a;
    10. cin>>a;
    11. if(a != 42)
    12. cout<<a<<endl;
    13. else
    14. break;
    15. }
    16.  
    17. return 0;
    18. }
    19.  
    20.