Cod sursa(job #527392)
Utilizator | Data | 31 ianuarie 2011 13:41:29 | |
---|---|---|---|
Problema | Factorial | Scor | 5 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include<fstream.h>
int i=0,j,k,l,m,n,aux=0,t,a[100],p=1,s=0;
int main(){
ifstream fin("fact.in");
fin>>p;
fin.close();
ofstream fout("fact.out");
if(p==0){
fout<<"1";
}
else
{
while(s!=p)
{
if(i%5==0)
{
s++;
}
i++;
}
fout<<i-1;}
fout.close();
return 0;
}