about | help | code help+videos | done | prefs |
Write a method that converts the number 'num' to the base 'base'. As preconditions you may assume that num>0 and 2<=base<=10. The result will be returned as a string. You may use recursion to solve this problem, but it is not required. (but it sure helps) archToBase(1, 5) → "1" archToBase(421824, 7) → "3404544" archToBase(324932, 6) → "10544152" ...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: 470
Copyright Nick Parlante 2017 - privacy