Post Reply 
(11C) Digit Sum
01-20-2018, 05:21 PM (This post was last modified: 01-20-2018 06:49 PM by Dieter.)
Post: #6
RE: (11C) Digit Sum
(01-20-2018 10:10 AM)Gamo Wrote:  Press A and calculator briefly show 4 digits number ...

The program generates a number between 0 and 9999, so this number may have one, two, three or four digits. A four-digit number, i.e. between 1000 and 9999, is generated this way:

Code:
RAN#
9
EEX
3
x
INT
EEX
3
+

Also, why do you waste another register (R2) for the digit sum? It is already stored in R1 (OK, 1/10 of it).

Code:
...
GTO 1
1
0
ST0x1
CLx
R/S
RCL 1
RCL 0
RTN

Every byte counts. ;-)

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(11C) Digit Sum - Gamo - 01-16-2018, 08:52 AM
RE: (11C) Digit Sum - Dieter - 01-16-2018, 07:16 PM
RE: (11C) Digit Sum - wawa - 01-20-2018, 08:14 AM
RE: (11C) Digit Sum - Dieter - 01-20-2018, 09:23 AM
RE: (11C) Digit Sum - Gamo - 01-20-2018, 10:10 AM
RE: (11C) Digit Sum - Dieter - 01-20-2018 05:21 PM



User(s) browsing this thread: 1 Guest(s)