apl-mhd

recursion vejalla

Aug 18th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.16 KB | None | 0 0
  1. int print(int n){
  2.      int x;
  3.      if(n==2)
  4.         return 0;
  5.      
  6.        
  7.      for(int i=1; i<=2; i++){
  8.          
  9.          x =( i + print(n+1));
  10.        
  11.          cout<<x<<" ";
  12.     }
  13.            
  14.     return x;
  15. }
Add Comment
Please, Sign In to add comment