about | help | code help+videos | done | prefs |
Write a recursive method that returns the sum of all the even digits in a non-negative integer. Your solution MUST use recursion in a non-trivial way. Make sure you solution is clear and uses good, considerate programming methodology. Be careful! This one is a little tricky! Remember that when you are not in the base-case there MUST be a recursive call of some sort. vpeepsEvenDigitSum(42892) → 16 vpeepsEvenDigitSum(52152) → 4 vpeepsEvenDigitSum(123456) → 12 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 390
Copyright Nick Parlante 2017 - privacy