Cod sursa(job #1577818)
| Utilizator | Data | 23 ianuarie 2016 21:20:16 | |
|---|---|---|---|
| Problema | Factorial | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.3 kb |
#include<fstream>
#include<math.h>
using namespace std;
int main ()
{
ifstream fin ("fact.in");
ofstream fout ("fact.out");
int y,x,P,N=1;
fin>>P;
y=pow(10,P);
while(x>y)
{
x=N*(N+1);
N++;
}
fout<<x;
fin.close ();
fout.close ();
}
