Advertisement
Guest User

Untitled

a guest
Aug 30th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int n;
  6. int rec(int i, int j){
  7.     if (i == n) return 1;
  8.     return rec(i + 1, j + 1) + rec(i + 1, j);
  9. }
  10.  
  11. int main(){
  12.     cin >> n;
  13.     cout << rec(1, 1);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement