Cod sursa(job #778495)
Utilizator | Data | 14 august 2012 21:45:32 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.52 kb |
#include<stdio.h>
int main()
{
int n,p,i=0,m;
printf("Introduceti nr de zerouri");
scanf("%d",&p);
n=1;
while(p!=i)
{
n++;
if(n%5==0)
{
m=n;
while(m%5==0)
{
i++;
m=m/5;
}
} }
printf("Nr este %d",n);
}