Advertisement
TwITe

Untitled

Jul 21st, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. void rec() {
  2.     int n;
  3.     cin >> n;
  4.     if (n != 0) {
  5.         rec();
  6.         cout << n << " ";
  7.     }
  8. }
  9.  
  10. int task1()
  11. {
  12.     rec();
  13.     return 0;
  14. }
  15.  
  16. int main()
  17. {
  18.     task1();
  19.  
  20.     system("PAUSE");
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement