#include int factorial(int n); //Returns factorial of n. //The argument n should be nonnegative. int main( ) { cout << "0! = " << factorial(0) << endl; cout << "1! = " << factorial(1) << endl; cout << "2! = " << factorial(2) << endl; cout << "3! = " << factorial(3) << endl; return 0; } int factorial(int n) { int product = 1; while (n > 0) { product = n * product; n--; } return product; }