#include #include using namespace std; const double N{15}; int main() { double stirlings{0}; double actual{0}; stirlings = exp( -N) * pow(N,N) * sqrt(2*M_PI*N); actual = 15.0*14.0*13.0*12.0*11.0*10.0*9.0*8.0*7.0*6.0*5.0*4.0*3.0*2.0; cout << N << "! by stirlings is " << stirlings << endl; cout << N << "! by calculation is " << actual << endl; return 0; }