Cod sursa(job #552367)
| Utilizator | Data | 12 martie 2011 10:16:31 | |
|---|---|---|---|
| Problema | Factorial | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.23 kb |
#include<fstream>
using namespace std;
ifstream f("fact.in");
ofstream g("fact.out");
int main()
{
int p,a,i,c;
f>>p;
a=1;
for(i=p;p>=1;i--)
{c+=5;
a*=(c-4)*(c-3)*(c-2)*(c-1)*c;
}
g<<c;
g.close();
f.close();
}
