fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n;
  7. cin >> n;
  8.  
  9. do
  10. {
  11. cout << n << endl;
  12. cin >> n;
  13. } while (n > 0);
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5320KB
stdin
5
3
2
1
0
stdout
5
3
2
1