(DM42) Lottery number generator programming
|
02-10-2019, 09:54 AM
Post: #1
|
|||
|
|||
(DM42) Lottery number generator programming
Hello,
I am a sheer beginner of DM42 programming and interesting in a simple and useful program. Today I conceive something like the random number generator and show sets of integers on DM42/Free42 or HP-42S. In short, Linux command: Code: shuf -i 1-Y -n X By the way, this program would suggest horse racing Trio BOX or Lotto 7 (which I don't buy them so often.) I wish you could help me to improve this idea. Sample select 4 nominations from 18 horses. Y=18 X=4 --- X and Y register into R0 and R1 STO 00 R↓ STO 01 --- Random Number Part to store into Alpha memory LBL "RNG" DATE TIME x SEED RAN RCLx 01 IP -- Verify given numbers are not the same each other. (This is going to mess my brain) x=y? R↓ ASTO GTO "RNG" ---Loop for X times LBL "LOOP" 1 STO- 00 RCL 00 X≤0? RTN AVIEW END How you combine or improve these, I only know a little about 8-bit BASIC. Thank you for reading and I look forward to hearing your great help. Best regards, |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(DM42) Lottery number generator programming - psw - 02-10-2019 09:54 AM
RE: (DM42) Lottery number generator programming - Dieter - 02-11-2019, 07:35 PM
RE: (DM42) Lottery number generator programming - Thomas Klemm - 02-12-2019, 12:57 AM
RE: (DM42) Lottery number generator programming - psw - 02-12-2019, 05:56 AM
|
User(s) browsing this thread: 1 Guest(s)