// Prog: fak-1.cpp
// compute the n!
#include
int main ()
{
std::cout << "Factorial of n =? ";
int n;
std::cin >> n;
// computation
unsigned int fak = 1;
for (unsigned int i = 2; i <= n; ++i) fak *= i;
// output
std::cout << "Factorial of " << n << " is " << fak << ".\n";
return 0;
}