Question: JAVA Problem: code to recursively chop up a number and then count how many of its digits are even. % and / will be very
JAVA
Problem: code to recursively chop up a number and then count how many of its digits are even. % and / will be very helpful.
Here are the rules for Lucky Threes.
* LuckyThrees will return the count of 3s in the number
* unless the 3 is at the front and then it does not count
* 3 would return 0
* 31332 would return 2
* 134523 would return 2
* 3113 would return 1
* 13331 would return 3
* 777337777 would return 2
* the solution to this problem must use recursion
Input: One integer will be passed in.
Output: Return the 3s count
Sample Input: 111 213435363 333333 313
Output Input: 0 4 5 1
**PLEASE USE THIS FORMAT***
int go( int n ) { // your code goes here }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
