Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/careercup/ctci
/ factorsOf5
Method
factorsOf5
java/Chapter 17/Question17_3/QuestionA.java:4–11 ·
view source on GitHub ↗
(int i)
Source
from the content-addressed store, hash-verified
2
3
public
class
QuestionA {
4
public
static
int
factorsOf5(
int
i) {
5
int
count = 0;
6
while
(i % 5 == 0) {
7
count++;
8
i /= 5;
9
}
10
return
count;
11
}
12
13
public
static
int
countFactZeros(
int
num) {
14
int
count = 0;
Callers
1
countFactZeros
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected