Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. void recursivo(int n){
  6.     if(n == 1){
  7.         cout << n << endl;
  8.     }
  9.     else{
  10.         recursivo(n-1);
  11.         cout << n << endl;
  12.     }
  13. }
  14.  
  15. int main(){
  16.     recursivo(12);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement