// This program computes the factorial of any user given number N. // It was written by Fatemeh Amerikheirabadi. #include using namespace std; int pro (int a, int b) { int r; r=a*b; return r; } int main () { int a; int fact=1; int N; cout << "enter N" << endl; cin >> N; for (a=2 ; a<=N ; ++a) { fact= pro (fact, a); } cout << "the factorial of N is:" << "\t" << fact << endl; return 0; }