Guest User

Untitled

a guest
Jul 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. public static int factorsOfFiveIn(int n) {
  2. int factorsOfFive = 0;
  3. while (n > 1) {
  4. if (n % 5 == 0) factorsOfFive++;
  5. n /= 5;
  6. }
  7. return factorsOfFive;
  8. }
Add Comment
Please, Sign In to add comment