about | help | code help+videos | done | prefs |
The "digit product" of an integer is defined as either: the product of all the digits of the number if the number is greater than zero; or 1 if the number is less than or equal to zero. Write a method that recursively computes the "digit product" of the integer input parameter. For example, the digit product of 73112 is 42 since 7*3*1*1*2=42. finalExam2014DigitProduct(842942) → 4608 finalExam2014DigitProduct(2492184) → 4608 finalExam2014DigitProduct(12498) → 576 ...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: 440
Copyright Nick Parlante 2017 - privacy