Calcolo del fattoriale
#include <cstdlib>
#include <iostream>
using namespace std;
unsigned long Fattoriale(unsigned n);
int main()
{
unsigned n;
cout << "\n\t\t\tCalcolo del fattoriale\n" << endl;
cout << "n = ";
cin >> n;
cout << n << "! vale " << Fattoriale(n) << endl;
system("pause");
}
unsigned long Fattoriale(unsigned n)
{
unsigned long f = 1;
register unsigned i;
for (i = 1; i <= n; i++)
f *= i;
return f;
}