Post Reply 
HHC 2017 RPN Programming contest information and results thread
09-19-2017, 09:02 PM
Post: #39
RE: HHC 2017 RPN Programming contest information and results thread
Here is another 66 byte version that uses Werner's clever trick of 4/1 check. It works on a HP 41C, but uses synthetic commands.

Regards
Bernd

Code:
LBL "HAPPY"
ENTER^
CLA
LBL 11 
CLX
X<>Y
LBL 12
RCL X
10
ST/ Z
MOD
X^2
ST+ Z       ( calculate sqr sum in Z)
RDN
INT
X#0?
GTO 12
ISG a
""          ( byte 0xF0 )
RDN
4
X=Y?
"UN"
X!=Y?
SIGN
X!=Y?
GTO 11
+"HAPPY "
RCL d
FIX 0
CF 29
ARCL a
STO d
AVIEW
END
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HHC 2017 RPN Programming contest information and results thread - Bernd Grubert - 09-19-2017 09:02 PM



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