so this is what i have so far and am wondering if it is correct.
The problem asks if you have a class the size of 18 people and you want to divide the class into programmin teams of 3 members compute the different teams that can be arranged using this formula
write a c++ program that determines the number of potential team arrangements:
using namespace std;
const double PI = 3.14;
double n = 18.0;
double r = 3.0;
double nmr = 15.0;
double nFact = exp(-n) * pow(n, n) * sqrt(2 * PI * n);
double rFact = exp(-r) * pow(r, r) * sqrt(2 * PI * r);
double nmrFact = exp(-nmr) * pow(nmr, nmr) *sqrt(2 * PI * nmr);
//using sterlings formula
// cout <<setprecision(2)
// <<n<<"! = "
// <<exp(-n) * pow(n, n) * sqrt(2 * PI * n)<<endl;
cout << "The number of teams that can be arranged ="
the output is:
The number of teams that can be arranged is 839.89
I was wondering if this is correct. Any help would be greatly appreciated