Trailing zeroes in factorial coding question

 For an integer N find the number of trailing zeroes in N!.










STUDY EVERTHING



#include <stdio.h>
#include <conio.h>

void main(){
    int n, i, count=0, sum = 1;
    printf("enter the number: ");
    scanf("%d", &n);
    
    for(i=n; i>=1; i--)
    
    sum = sum*(i);
    {
    int count_digit(int sum){
    {
    if(sum > 0)
    {
        if(sum%10==0)
        count++;
        count_digit(sum/10);
}
return count;
    }
}
    printf("%d"count_digit(sum));
}}








Click on the above button too know more about the code

Post a Comment

If you have furthur QUERIES please let us know

Previous Post Next Post