Cod sursa(job #2393014)
| Utilizator | Data | 30 martie 2019 18:28:55 | |
|---|---|---|---|
| Problema | Factorial | Scor | 5 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.22 kb |
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
fstream f("fact.in");
ofstream g("fact.out");
int p,n=1;
f >> p;
for (int i=1; i<=p; i++)
n=i*n;
g << n;
}
