Post Reply 
HHC 2022 - Programming Contest - no responses until after 6am Monday 6am CENTRAL
09-12-2022, 01:51 PM
Post: #20
RE: HHC 2022 - Programming Contest - no responses until after 6am Monday 6am CENTRAL
My first try, 41-compatible, needs 1 register (00 here)
41: 42 bytes without LBL and END.

42-Style listing:

Code:
00 { 54-Byte Prgm }
01▸LBL "HHC2022"
02 STO 00
03 STO- 00
04 XEQ 10
05▸LBL 03 @ main loop
06 +
07 XEQ 10
08 ISG 00
09 X<>Y
10 X≠Y?
11 GTO 03
12 RCL 00 @ end
13 X<>Y
14 RTN
15▸LBL 10 @ reverse number X -> revX X
16 ENTER
17 ENTER
18 -
19 10
20 LASTX
21▸LBL 02
22 %
23 FP
24 STO+ ST Z
25 R↓
26 STO× ST Y
27 LASTX
28 IP
29 X≠0?
30 GTO 02
31 R↓
32 R↓
33 END

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HHC 2022 - Programming Contest - no responses until after 6am Monday 6am CENTRAL - Werner - 09-12-2022 01:51 PM



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