Here I try to write a program in C++ to find NCR. But I\'ve got a problem in the result. It is not correct. Can you help me find what the mistake is in the program?
Use double instead of int.
double
int
UPDATE:
Your formula is also wrong. You should use fact(n)/fact(r)/fact(n-r)
fact(n)/fact(r)/fact(n-r)