(12C) Palindromic Number - Printable Version +- HP Forums ( https://www.hpmuseum.org/forum)+-- Forum: HP Software Libraries ( /forum-10.html)+--- Forum: General Software Library ( /forum-13.html)+--- Thread: (12C) Palindromic Number ( /thread-13615.html) |

(12C) Palindromic Number - Gamo - 09-09-2019 08:01 AM
A palindromic number are those numbers which read the same backward as forward. The examination of these numbers is a field rich with possibilities for creative computing. Begin with any positive integer. If the sum is not a palindrome, treat it as the original number and continue. The process stops when a palindrome is obtained. For example, beginning with 78: 1. 78 + 87 = 165 2. 165 + 561 = 726 3. 726 + 627 = 1353 4. 1353 + 3531 = 4884 The conjecture, often assumed true, is that this process will always lead to a palindrome? How to run this program using example above: FIX 0 78 [R/S] display 4884 [X<>Y] display 4 Palindrome is 4884 and took 4 iterations ---------------------------------------------------- Program: Code:
Remark: This program is for use on general purpose only some number cannot be deal with this limited computation limit. Such number this calculator must need more than 10 digits to display and some example number is 196 try to run this on a super computer !!! Gamo |