Cod sursa(job #824103)
| Utilizator | Data | 25 noiembrie 2012 20:58:24 | |
|---|---|---|---|
| Problema | Factorial | Scor | 5 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.29 kb |
#include<iostream>
#include<fstream>
using namespace std;
ifstream fin("fact.in");
ofstream fout("fact.out");
using namespace std;
int main () {
int n,i;
long p=1;
fin >> n;
for (i =1;i<=n;i++)
p=p*i;
fout<< p;
fin.close();
fout.close();
return 0;
}
