#include <stdio.h>
main() {
    int n;
    scanf("%d", &n);
    int zz, count;
    int i = 5;
    while(zz >= 1) {
        zz = n / i;
        count += zz;
        i = i * 5;
    }
    printf("%d", count);
}
This is code to find trailing 0's in factorial of a number. It's giving different output in Ubuntu than on Windows.
 
     
     
     
    