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

 

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

Write a method that returns the "splat" of a number 'num'. The "splat" of a number is defined as the sum of the EVEN digits of that number. As a precondition, you may assume that 'num' is postive. Note that 'num' could have any number of even digits. Look at the test data for examples.


quiz2021_11_16_SLHL_splat(4879812) → 22
quiz2021_11_16_SLHL_splat(82497) → 14
quiz2021_11_16_SLHL_splat(71249) → 6

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

public int quiz2021_11_16_SLHL_splat(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: 240

Copyright Nick Parlante 2017 - privacy