>>275 �D-2
#include <iostream>
int comb(int n, int r)
{
if (r == 0 || r == n) return 1;
n--; // デクリメント演算子
return comb(n, r - 1) + comb(n, r);
}
int main()
{
int i, n, r;
long x;
std::cout << "n:"; std::cin >> n;
std::cout << "r:"; std::cin >> r;
std::cout << "nCr=" << comb(n, r) << std::endl;
return 0;
}
こんなんで良いのかな。違うような気もするが。