about | help | code help+videos | done | prefs |
Write a RECURSIVE method that returns the "crazy product" of the digits of the parameter 'wholeNum' with each digit offset by 'offset' amount. For example, the "crazy product" found using wholeNum=132 and offset=2 would be 60 because (1+2)*(3+2)*(2+2)=3*5*4=60. So each digit of 132 is increased by 2 and then multiplied together. Your solution must be completely recursive with no loops. The parameter 'wholeNum' will be greater than zero. The parameter 'offset' will be between 0 and 9. feb26_2016_APSLHL_crazyMultDigits(640085, 0) → 0 feb26_2016_APSLHL_crazyMultDigits(640085, 1) → 1890 feb26_2016_APSLHL_crazyMultDigits(22222222, 0) → 256 ...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: 330
Copyright Nick Parlante 2017 - privacy