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

 

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

You MUST write a RECURSIVE solution to this problem! You may use a helper method, but your solution MUST be RECURSIVE. Return the product of all the digits of a positive integer parameter. Look at the test data for examples. Note that if any of the digits are zeros the product will be zero.


may16_2016_APSLHL_digitProduct(3759) → 945
may16_2016_APSLHL_digitProduct(64822) → 768
may16_2016_APSLHL_digitProduct(80000) → 0

...Save, Compile, Run (ctrl-enter)

public int may16_2016_APSLHL_digitProduct(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: 290

Copyright Nick Parlante 2017 - privacy