#include #include #include using namespace std; const int NUMBER {15}; int main() { double part1{pow(M_E,-NUMBER)}, part2, part3, approximation; long actualValue; float x = 1; cout << "X without showpoint " << x << endl; cout << showpoint; cout << "X with showpoint " << x << endl; actualValue = static_cast(15)*14*13*12*11*10*9*8*7*6*5*4*3*2; //actualValue = 15L*14*13*12*11*10*9*8*7*6*5*4*3*2; part2 = pow(NUMBER, NUMBER); part3 = sqrt(2 * M_PI * NUMBER); approximation = part1 * part2 * part3; //cout << fixed; cout << scientific; //cout << setprecision(0); /* cout << " 123456789012345" << endl; cout << "pi = " << M_PI << endl; cout << "e = " << M_E << endl; */ cout << NUMBER << "! is about " << approximation << endl; cout << NUMBER << "! is " << actualValue << endl; return 0; }