(11C) Roll Two Dice at Random
|
07-22-2018, 09:44 AM
(This post was last modified: 07-23-2018 01:19 AM by Gamo.)
Post: #1
|
|||
|
|||
(11C) Roll Two Dice at Random
This program is the improved version of the "Roll Two Dice at Random"
previously posted on the general software library for (12C) http://www.hpmuseum.org/forum/thread-10565.html This version display the face result of Two Dice at the same time and total up. Example: f [A] Two dice randomly roll display 3.5 First dice face is 3 Second Dice face is 5 Total is 8 Calculator display 3.5 pause and show total of 8 Program: Roll Two Dice at Random Code:
Gamo |
|||
07-22-2018, 01:13 PM
Post: #2
|
|||
|
|||
RE: (11C) Roll Two Dice at Random
Based on Werner's idea this is what I came up with:
Code: 001-42,21,11 LBL A Kind regards Thomas |
|||
07-22-2018, 02:49 PM
Post: #3
|
|||
|
|||
RE: (11C) Roll Two Dice at Random
Or then you ditch the idea and don't use registers at all:
Code: 001-42,21,11 LBL A |
|||
12-29-2018, 01:54 AM
(This post was last modified: 12-29-2018 12:57 PM by Gamo.)
Post: #4
|
|||
|
|||
RE: (11C) Roll Two Dice at Random
Roll Two Dice at Random Updated Version II
This update shown two dice as on previous program but total on exponent. Display will show as X.X ________XX Program: Code:
Gamo |
|||
12-29-2018, 09:09 AM
Post: #5
|
|||
|
|||
RE: (11C) Roll Two Dice at Random
(12-29-2018 01:54 AM)Gamo Wrote: Roll Two Dice at Random Updated Version II There is no need to use a second data register – both random numbers are kept on the stack. You may simply remove both the STO 2 and the RCL 2 commands. Dieter |
|||
12-29-2018, 12:58 PM
Post: #6
|
|||
|
|||
RE: (11C) Roll Two Dice at Random
Dieter thanks now I make changed as suggested.
Gamo |
|||
12-29-2018, 07:30 PM
Post: #7
|
|||
|
|||
RE: (11C) Roll Two Dice at Random
(12-29-2018 09:09 AM)Dieter Wrote: There is no need to use a second data register – both random numbers are kept on the stack. You may simply remove both the STO 2 and the RCL 2 commands. There is no need to waste even a single data register. It can all be done on the stack: Code: 01 LBL A Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)