/*
***********************************************************************
*
* 1024! 末尾有多少个0 ?
*
/*********************************************************************** */
#include < stdio.h >
int totalzero( int n)
{
int total = 0 ;
while (n > 5 )
{
n = (n - (n % 5 )) / 5 ;
total += n;
}
return total;
}
void main()
{
printf( " %d\n " , totalzero( 1024 ));
}
*
* 1024! 末尾有多少个0 ?
*
/*********************************************************************** */
#include < stdio.h >
int totalzero( int n)
{
int total = 0 ;
while (n > 5 )
{
n = (n - (n % 5 )) / 5 ;
total += n;
}
return total;
}
void main()
{
printf( " %d\n " , totalzero( 1024 ));
}