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

 

addEvenDigits


The digits 0, 2, 4, 6, and 8 are even. The digits 1, 3, 5, 7, and 9 are odd. Given a 2-digit number, return the sum of the even digits in the number.


addEvenDigits(46) → 10
addEvenDigits(43) → 4
addEvenDigits(57) → 0

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

int addEvenDigits(int a) { }

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: 100

Copyright Nick Parlante 2017 - privacy