|
|
#1 |
|
FFR Player
Join Date: Jun 2006
Location: New York
Age: 29
Posts: 504
|
Hey all,
I have to make a program that converts from any base number system to another. I know how to do anything to base ten, but how do you go from anything to anything? Going to base ten is simple: digit3 * base^2 + digit2 *base^1 +digit1*base^0 etc; but how do you set it up to go from other bases? I know its easy, but I can't think of the setup -.- ![]() Thanks. ![]() |
|
|
|
|
|
#2 |
|
FFR Player
Join Date: Jun 2006
Location: New York
Age: 29
Posts: 504
|
Thanks for the help everyone :/
I got it working. |
|
|
|
|
|
#3 |
|
FFR Player
|
Congrats on getting it working =]
Sorry about that, I honestly didn't know how I could get that done. What language were you doing this in? |
|
|
|
|
|
#4 |
|
FFR Player
Join Date: Jun 2006
Location: New York
Age: 29
Posts: 504
|
Java -- all standard classes (String Scanner and StringBuffer is all I used I think :s, oh and the Math class
)Last edited by RandomPscho; 03-12-2007 at 04:26 PM.. |
|
|
|
|
|
#5 |
|
FFR Player
Join Date: Apr 2007
Location: IRC
Posts: 26
|
I know it has something to do with s.toString(int, int)...with s being a String and those two ints being something and the base you want...I forgot the exact usage though
![]()
__________________
http://spzc.net/ |
|
|
|
|
|
#6 |
|
FFR Player
Join Date: Jun 2006
Location: New York
Age: 29
Posts: 504
|
|
|
|
|
|
|
#7 |
|
Banned
|
Oh damn I wish I had my old C++ base converter for you, it did any conversion from 32 down.
|
|
|
|
|
|
#8 |
|
FFR Player
Join Date: Jun 2006
Location: New York
Age: 29
Posts: 504
|
Mine does up to 35
![]() |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|