|
From: chromatonus 7. <chr...@ho...> - 2002-03-09 02:10:42
|
hi, I am writing a prgm that takes a number (like 19), and its base, (10 in this case), and perform the following operation until a palindrome is obtained: add the reverse of 19 19+91 = 110 add the reverse of 110 110 + 11 = 121....a palindrome, and the prgm should print out the 121. I think there are several caveats: bases can range from 10 to 16, so the A,B,C,D,E,F is tricky to handle as numbers, because the input would be like A32 for example. And how to reverse the number and check to see if it's a palindrome, and also doing addition in different bases. Any tip on these will be greatly appreciated! _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. |