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

 

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

The definition of an "excellentMashUp" of two positive integers is the product of the sums of each of their digits. So the "semiproduct" of 21 and 71 is 24 because 2+1=3 and 7+1=8, then 3*8=24. Decompose out a separate digitSum(int n) method that finds the sum of the digits of a positive integer. You MUST use recursion in the digitSum method in order to earn credit for this problem.


ppp3excellentMashUp(18, 3) → 27
ppp3excellentMashUp(46, 73) → 100
ppp3excellentMashUp(12, 35) → 24

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

public int ppp3excellentMashUp(int a, int b) { }

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

Copyright Nick Parlante 2017 - privacy