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