Trailing zeros is a sequence of 0s in a number.
In order to find trailing zeros in factorial of a number we divide the number by 5 and its powers till 5 power k is smaller than the number.
To know more about trailing zeros and its uses click Here
Program :
You might also be interested in
Check if a number is a Fibonacci number or not
Find Factorial of a number
Find Square root using Babylonian method
Bubble sort Algorithm
Stack implementation using linked list
Queue implementation using linked list
In order to find trailing zeros in factorial of a number we divide the number by 5 and its powers till 5 power k is smaller than the number.
To know more about trailing zeros and its uses click Here
Program :
C++ Program
Sample input and output to check the program
You might also be interested in
Check if a number is a Fibonacci number or not
Find Factorial of a number
Find Square root using Babylonian method
Bubble sort Algorithm
Stack implementation using linked list
Queue implementation using linked list
Comments
Post a Comment