Advertisement
Guest User

2

a guest
Oct 19th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int n;
  6.  
  7. void g(int col){
  8. int e;
  9. cin >> e;
  10. if (col == n) {
  11. cout << e << " ";
  12. return;
  13. }
  14. g(col + 1);
  15. cout << e << " ";
  16. }
  17.  
  18. int main (){
  19. cin >> n;
  20. g(1);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement