Post Reply 
Powerball Generator!
05-23-2024, 09:42 PM
Post: #1
Powerball Generator!
...who doesn't need a handy Powerball generator every now and then? Tongue

Picks 1st five numbers between 1-69, no-dupes, then picks the lucky Powerball number between 1-26! Uses the Alpha Register to format the output, a 1x6 array, and the fancy [FIND] function to keep duplicates in check!

00 { 127-Byte Prgm }
01 LBL "PBALL"
02 CLA
03 CLD
04 6
05 1
06 DIM "PBALL"
07 INDEX "PBALL"
08 1.00501
09 STO "CNT"
10 LBL 01
11 RCL "CNT"
12 1
13 STOIJ
14 RAN
15 100
16 ×
17 IP
18 STO 10
19 69
20 X<>Y
21 X>Y?
22 GTO 01
23 X≤0?
24 GTO 01
25 [FIND]
26 GTO 01
27 STOEL
28 ├" "
29 AIP
30 ISG "CNT"
31 GTO 01
32 LBL 02
33 6
34 1
35 STOIJ
36 RAN
37 100
38 ×
39 IP
40 STO 10
41 26
42 X<>Y
43 X>Y?
44 GTO 02
45 X≤0?
46 GTO 02
47 STOEL
48 ├" PB: "
49 AIP
50 AVIEW
51 END
Find all posts by this user
Quote this message in a reply
05-24-2024, 12:36 PM
Post: #2
RE: Powerball Generator!
If I run this program and win, do I have to split the winnings? Smile
Find all posts by this user
Quote this message in a reply
05-24-2024, 04:18 PM
Post: #3
RE: Powerball Generator!
Winner's choice! Tongue

(05-24-2024 12:36 PM)carey Wrote:  If I run this program and win, do I have to split the winnings? Smile
Find all posts by this user
Quote this message in a reply
Post Reply 




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