Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
282 B
1
Indexable
Never
#include<bits/stdc++.h>
using namespace std;
int recur(int n, int r)
{
	if (r == 0 || r == n)
		return 1;
	else
		return recur(n - 1, r - 1) + recur(n - 1, r);



}
int main()
{
	int n, r;
	cin >> n >> r;
	int ncr = recur(n, r);
	cout << ncr << endl;
	return 0;
}