Advertisement
ernstMach

Untitled

Nov 28th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.19 KB | None | 0 0
  1. static int count7(int n, int count) {
  2.         if (n < 1)
  3.             return count;
  4.         if (n % 10 == 7)
  5.             return count7(n / 10, count + 1);
  6.         return count7(n / 10, count);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement