fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. //number of trailing zeroes in n!
  5. int n,s=0;
  6. scanf("%d",&n);
  7.  
  8. while(n!=0)
  9. {
  10. n=n/5;
  11. s=s+n;
  12.  
  13. }
  14. printf("%d",s);
  15.  
  16. }
Success #stdin #stdout 0s 4556KB
stdin
100
stdout
24