..
Last edited on
hi,
this is the formula:
logb(x) = logk(x) / logk(b)
where:
b = base
x = number
k = any base, tipicaly 10 or 2.718...
you can find log function in math.h
then write a function which will convert base with that formula for number x.
..
Last edited on
When I convert to hexadecimal base, how do I make it so the 10's are displayed as "A", 11's as "B", and so forth?
...
Last edited on
Two questions:
1) Is x set to zero before the while(Dec!=0)
at line 8?
2) How big is the rem[] array? How many values can it store?
...
Last edited on
number with more than 3 digits |
Example: 3544
10 = 110111011000
2.
You would need to store 12 elements.
The
rem[10] array is not big enough to store your data.
Easy solution: make
rem[] bigger.
Last edited on
..
Last edited on