id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > sumEvenDigits
prev  |  next  |  chance

Write a RECURSIVE method to find the sum of the EVEN digits of 'num'. You MUST use recursion. No strings or string methods are allowed. Remember div "/" and mod "%"? Those are REALLY helpful, so use them! Remember, your solution MUST be recursive.


sumEvenDigits(26) → 8
sumEvenDigits(64) → 10
sumEvenDigits(74218) → 14

...Save, Compile, Run (ctrl-enter)

public int sumEvenDigits(int num) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 390

Copyright Nick Parlante 2017 - privacy