about | help | code help+videos | done | prefs |
The digit product of a non-negative integer is the product of all the digits on that integer. For example, the digit product of 516 is 30 since 5*1*6=30. The recursive digit product of a number finds the digit product of a number, then finds the digit product of that result and continues until a single digit number is obtained. For example, the recursive digit product of 516 is 0 since the digit product of 516 is 30, and the digit product of 30 is 0. As another example, the recursive digit product of 42782 is 8. Here is the process: Digit product of 42782 is 896. Digit product of 896 is 432. Digit product of 432 is 24. Digit product of 24 is 8. Write a method that returns the recursive digit product of the non-negative integer parameter 'num'. Look at the test data for further examples. quiz2023_02_28_SLHL_digitProductRecursive(88) → 8 quiz2023_02_28_SLHL_digitProductRecursive(12489) → 0 quiz2023_02_28_SLHL_digitProductRecursive(9234) → 2 ...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: 280
Copyright Nick Parlante 2017 - privacy