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

 

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

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)

public int finalExam2014DigitProduct(int num) { }

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

Copyright Nick Parlante 2017 - privacy