2 - Convert a number to base n
Closed this issue · 0 comments
jirevwe commented
Write a program to convert a number N
from base 10
to base n
.
- Generate a random number
n
. - Generate a random integer
N
in base 10. - Convert the integer
N
tobase n
, and output the result.
Things to consider
- Make sure the value of
n
is a positive integer between 2 and 16 (n
should not be 10) - Make sure that
N
is a positive integer less than INFINITY