(12C) Digit Sum
|
01-08-2019, 08:24 AM
Post: #6
|
|||
|
|||
RE: (12C) Digit Sum
(01-08-2019 04:34 AM)Gamo Wrote: Simple straight forward approach for Digit Sum For a slightly different approach: Code: 01- 44 0 STO 0 Example: 4711 R/S 13 The program calculates: 4711 - 9×471 - 9×47 - 9×4 = 13 Or a bit longer without use of registers: Code: 01- 36 ENTER Here it calculates: 4711 - 9×(471 + 47 + 4) = 13 Cheers Thomas PS: Just noticed that x=0 doesn't enable stack-lift. Is that well known? |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(12C) Digit Sum - Gamo - 05-03-2018, 10:50 AM
RE: (12C) Digit Sum - Dieter - 05-03-2018, 06:02 PM
RE: (12C) Digit Sum - Dieter - 05-04-2018, 12:11 PM
RE: (12C) Digit Sum - Gamo - 05-10-2018, 12:11 PM
RE: (12C) Digit Sum - Gamo - 01-08-2019, 04:34 AM
RE: (12C) Digit Sum - Thomas Klemm - 01-08-2019 08:24 AM
|
User(s) browsing this thread: 2 Guest(s)