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

 

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

Write a method the calculates the product of 'a' and 'b' RECURSIVELY without using multiplication. Your solution MUST USE recursion and MUST NOT use multiplication. As preconditions, you may assume that both 'a' and 'b' are positive.


recMult(11, 11) → 121
recMult(11, 121) → 1331
recMult(1331, 11) → 14641

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

public int recMult(int a, int b) { }

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

Copyright Nick Parlante 2017 - privacy