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

 

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

Write a method that converts 'origNum' to base 'base' and returns as string as shown in the test data. As preconditions you may assume that 'origNum' will be greater than zero and that 'base' will be between 2 and 10 inclusive.


test2020_10_29_SLHL_writeInBase(42151, 3) → "42151 = 2010211011 base 3"
test2020_10_29_SLHL_writeInBase(5, 2) → "5 = 101 base 2"
test2020_10_29_SLHL_writeInBase(325643, 10) → "325643 = 325643 base 10"

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

public String test2020_10_29_SLHL_writeInBase(int origNum, int base) { }

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