Cod sursa(job #286115)
| Utilizator | Data | 23 martie 2009 15:11:32 | |
|---|---|---|---|
| Problema | Factorial | Scor | 10 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.25 kb |
#include<fstream>
using namespace std;
int main()
{
int p,n=0;
ifstream fin("fact.in");
fin>>p;
fin.close();
if(p==0)n=1;
while(p)
{
n+=5;
p--;
}
ofstream fout("fact.out");
fout<<n;
fout.close();
return 0;
}
