- 3
c=m!*n!/(m+n)!
3 Answers
+ 7
What are the variable's values?
+ 3
//Something like this, perhaps...?
#include <iostream>
using namespace std;
int factorial(int x){
if (x <= 1){return 1;}
else {return x*factorial(x-1);}
}
int main() {
double c;
int m, n;
cin >> m;
cin >> n;
c = factorial(m) * factorial(n) / factorial(m+n);
cout << c;
return 0;
}
0
how to solve?