知识点:
5的倍数出一个零
25的倍数在出一个零
//求阶乘尾数零的个数
//100!的尾数有多少个零
#include <stdio.h>
int main()
{
int a,count=0;
for(a=5;a<=100;a+=5)
{
++count;//若为5的倍数,计数器加1
if(!(a%25))++count;//若为25的倍数,计数器再加1
}
printf("The number of 0 in the end of 100! is: %d\n",count);
return 0;
}