我写了一个,不知道对不对.难得检验.
#include<stdio.h>
main( )
{int i,n,s=0,m,count=0;
scanf("%d",&n);
if(n<0)printf("error\n");
else if(n<5)printf("number=0\n");
else
{for(i=0;i<=n;i+=5,count=0)
{
m=i;
while(m>=5)
{
m=m/5;count++;}
s+=count;}
printf("number=%d\n",s);}
}