Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ countZero
Function
countZero
CPP/questions/trailZeros.cpp:6–14 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
4
//This program prints the number of zeros in a factorial.
5
6
int countZero(int n)
7
{
8
int res = 0;
9
for(int i = 5;i<=n;i = i*5)
10
{
11
res = res + n/i;
12
}
13
return res;
14
}
15
16
17
int main()
Callers
1
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected