Cod sursa(job #529753)
Utilizator | Data | 5 februarie 2011 21:33:28 | |
---|---|---|---|
Problema | Factorial | Scor | 5 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include<fstream.h>
#include<stdio.h>
ifstream f("fact.in");
ofstream g("fact.out");
int main(){
long p,i=1,n,fact=1,zero=0;
f>>p;//
if(p<100) g<<5*p<<"\n";
/*while(zero<p){
fact=fact*i;
if(fact%10==0){
zero++;
fact=1;
}
i++;
}
g<<(i-1)<<"\n";*/
return 0;
}