Post Reply 
RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g)
06-30-2019, 11:57 PM
Post: #5
RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g)
HP-42S implementation:

Code:
00 { 86-Byte Prgm }
01▸LBL "PRCOL"
02 STO 00
03 1
04 STO+ 00
05 STO 01
06 ENTER
07 NEWMAT
08 STO "R"
09 INDEX "R"
10 2
11 STOEL
12 GROW
13 STO 03
14 STO 04
15 GTO 03
16▸LBL 00
17 2
18 STO+ 01
19 1
20 STO 02
21▸LBL 01
22 2
23 STO+ 02
24 RCL 02
25 X↑2
26 RCL 01
27 X<Y?
28 GTO 02
29 LASTX
30 MOD
31 X=0?
32 GTO 00
33 GTO 01
34▸LBL 02
35 DSE 03
36 GTO 00
37 J+
38 STOEL
39 2
40 STO+ 04
41 RCL 04
42 STO 03
43▸LBL 03
44 DSE 00
45 GTO 00
46 RCL "R"
47 CLV "R"
48 END

Thank you, Gerson! I always enjoy these challenges. Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: RPL mini-challenge - Triangle of Primes (HP-49G/G+,50g) - Thomas Okken - 06-30-2019 11:57 PM



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