I've been working on a nifty program that figures out what number you're thinking of by binary division. (Is it 500? Is it 750? Is it 625?..., until it gets it.)
Then I realized a problem:
quote: lowerbound = guessNumber.dup
This method is a string method. I could convert guessNumber back to a string, dup it, then convert back. But there has to be a better way. What's the method I need?
Thanks ^_^.
[ June 15, 2007, 02:47 PM: Message edited by: Phanto ]
Posted by fugu13 (Member # 2859) on :
But more importantly, why are you trying to duplicate a number?
Posted by Phanto (Member # 5897) on :
Because I want lowerbound to take the value of guessNumber and then I want to change guessNumber's value without changing that of lowerbound.
Posted by fugu13 (Member # 2859) on :