The code works fine now, but I need it to convert whatever the answer is to base 10 and then to base 6. How do you write this in C language? I know the math of it but can't put it in C language.
Originally posted by: DaveSimmons
Didn't you learn how "%" works in the last assignment? does the number to the right of it have to always be a constant?
for base-r _to_ base-10 think about how you convert binary to decimal
Yes, I know you keep multiplying by the base, so if its (XYZ.W)r its = X x r^2 + Y x r^1 + Z x r^0 + W x r-1 and that gives me base 10, but I dont know how to write it in C language for any number and how to input it in the calculator program.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.