Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int count7(int n, int count) {
- if (n < 1)
- return count;
- if (n % 10 == 7)
- return count7(n / 10, count + 1);
- return count7(n / 10, count);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement