Cod sursa(job #527385)
Utilizator | Data | 31 ianuarie 2011 13:26:54 | |
---|---|---|---|
Problema | Factorial | Scor | 5 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.26 kb |
#include<fstream.h>
int i=1,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");
while(s!=p)
{
if(i%5==0)
{
s++;
}
i++;
}
fout<<i-1;
fout.close();
return 0;
}