Cod sursa(job #1044309)
Utilizator | Data | 29 noiembrie 2013 16:40:14 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.25 kb |
#include <iostream>
#include <fstream>
using namespace std;
int main()
{int P,i,n,N;
ifstream fin("fact.in");
ofstream fout("fact.out");
fin >>P;
n=P;
for(i=1;i<=n;i++)
{(N)=(N)*i;
}
fout <<N;
fin.close();
fout.close();
return 0;
}