HP Forums
(38G) Digit Reversal, OEIS A004086 - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (38G) Digit Reversal, OEIS A004086 (/thread-9223.html)



(38G) Digit Reversal, OEIS A004086 - Gerald H - 10-04-2017 01:36 PM

The programme REVN takes a natural number input from Ans & returns the digit reversed number in Ans & variable T.

This is

https://oeis.org/A004086

REVN

Code:
Ans►N:
0►T:
WHILE N
REPEAT
N MOD 10+T*10►T:
INT(N/10) ►N:
END:
T: