Re: a simple programming challenge Message #11 Posted by Valentin Albillo on 25 May 2005, 1:30 p.m., in response to message #9 by Don Shepherd
Hi again, Don:
Don posted:
"Valentin, I especially liked how you initialized N to 100 and used that as your comparison variable with the sum and product, rather than
constructing the number by multiplying individual digits by 100 and 10. Very clever!"
Thanks for your appreciation, it's a well-known trick that obviates the need to reconstruct the number from its digits, which is usually a lot more expensive in RAM and running time than simply having a variable that gets incremented as each digit configuration is tried. The more digits the number has, the more the savings.
"I really did not want to expand my calculator collection, but everytime I see Valentin use the 71B, I get a little closer to looking for one on Ebay!"
I'm truly glad if my humble efforts serve to make HP fans aware of this wonderful, much underestimated model. Actually, HP-71Bs were extremely common a few years ago, to the point that at some fan meeting in England one was given for free to each and every attendant, including an HP-IL ROM. They had a large box with a number of HP-71Bs in there, and everyone simply grabbed one upon arriving.
Even on eBay, you can easily locate some at reasonable prices, and failing that, you can get acquainted with its awesome programming capabilities and try all my examples and challenges by using Emu71, a free emulator for Windows, or, if you've got a 48/49 and do want portability, HP-71X
by Hrastprogrammer is a wonderful choice.
Best regards from V.
|