about | help | code help+videos | done | prefs |
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) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 240
Copyright Nick Parlante 2017 - privacy