Post Reply 
HHC 2018 Programming Contests
06-25-2019, 01:27 AM (This post was last modified: 06-25-2019 01:29 AM by Craig Bladow.)
Post: #88
RE: HHC 2018 Programming Contests
(10-05-2018 12:00 AM)Joe Horn Wrote:  Craig Bladow's RPN contest entry can be downloaded from HERE.

My observations about Craig's entry:
  • Program name: "ELEGANT". Clever. Wink
  • Built-in instructions. Very nice!
  • Uses MOD algorithm (earns two "elegance" points).
  • Nicely formatted outputs.
  • Unfortunately gets wrong answers. Input 8/19/1955, outputs 12/07/2018, should be 10/22/2018.

Thank you for judging this, Joe! I've had a chance to review my solution and it does get right answers, just not all of them! Wink I misinterpreted the contest description and implemented a solution that only reports days with one +100 and one -100 extrema. 10/22/2018 has two +100 extrema so it wasn't reported by my program.

The following is a corrected program:
Code:

LBL "ELEGANT"
"BY CRAIG BLADOW"
"XEQ ELEGANT OR"
"PRESS A IN USER"
"MODE, ENTER"
"BDAY PRESS R/S"
"BEEP, DISPLAYS"
"WHEN EXT FOUND"
"PRESS R/S FOR"
"EACH BRTHYM"
"R/S FOR NEXT"
"EXTREMA DAY"
"CHECKS EACH DAY"
"FOR +/- EXT"
"USES NO TRIG"
"CHECKS DAY MOD"
"PERIOD EQUAL"
"6,7,8 FOR +EXT"
"17,21,25 FOR"
"-EXT"
LBL A
"BDY?:MM.DDYYYY"
PROMPT
STO 11
DATE
DDAYS
STO 10
23
STO 00
28
STO 01
33
STO 02
LBL 00
0  
STO 12
1
STO+ 10
.002
STO 09
LBL 01
RCL 10
RCL IND 09
MOD
RCL 09
INT
6
+
X=Y?  
XEQ 06
ISG 09
GTO 01
LBL 02
.002
STO 09
LBL 03
RCL 10
RCL IND 09
MOD
RCL 09
INT
4
*
17
+
X=Y?
XEQ 06
GTO 04
ISG 09
GTO 03
2
RCL 12
X<Y?
GTO 00
LBL 04
RCL 11
RCL 10
DATE+
FIX 06
CLA
ADATE
AVIEW
BEEP
STOP
FIX 00
CF 29
"PHYSICAL: "
23
XEQ 05
ARCL ST X
AVIEW
STOP
"EMOTIONAL: "
28
XEQ 05
ARCL ST X
AVIEW
STOP
"INTELLECTUAL: "
33
XEQ 05
ARCL ST X
AVIEW
SF 29
STOP
GTO 00
LBL 05
RCL 10
X<>Y
√∑
360
*
SIN
100
*
RND
RTN
LBL 06
1
ST+ 12
RTN
END

Try CC41!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HHC 2018 Programming Contests - Joe Horn - 09-13-2018, 02:17 PM
RE: HHC 2018 Programming Contests - pier4r - 09-13-2018, 06:29 PM
RE: HHC 2018 Programming Contests - Zaphod - 09-13-2018, 10:10 PM
RE: HHC 2018 Programming Contests - Gene - 09-13-2018, 10:56 PM
RE: HHC 2018 Programming Contests - Gene - 09-14-2018, 12:06 AM
RE: HHC 2018 Programming Contests - Jlouis - 09-19-2018, 07:00 PM
RE: HHC 2018 Programming Contests - sasa - 09-19-2018, 11:17 AM
RE: HHC 2018 Programming Contests - pier4r - 09-29-2018, 07:41 PM
RE: HHC 2018 Programming Contests - 3298 - 09-30-2018, 05:32 PM
RE: HHC 2018 Programming Contests - 3298 - 09-30-2018, 08:47 PM
RE: HHC 2018 Programming Contests - Gene - 09-29-2018, 07:22 PM
RE: HHC 2018 Programming Contests - Gene - 10-01-2018, 02:55 AM
RE: HHC 2018 Programming Contests - sasa - 10-01-2018, 05:31 AM
RE: HHC 2018 Programming Contests - sasa - 10-01-2018, 09:54 AM
RE: HHC 2018 Programming Contests - 3298 - 10-01-2018, 06:37 AM
RE: HHC 2018 Programming Contests - Werner - 10-01-2018, 01:42 PM
RE: HHC 2018 Programming Contests - Werner - 10-02-2018, 06:10 AM
RE: HHC 2018 Programming Contests - Namir - 10-04-2018, 06:09 PM
RE: HHC 2018 Programming Contests - Werner - 10-03-2018, 02:03 PM
RE: HHC 2018 Programming Contests - Werner - 10-04-2018, 05:55 AM
RE: HHC 2018 Programming Contests - 3298 - 10-04-2018, 02:48 PM
RE: HHC 2018 Programming Contests - Craig Bladow - 06-25-2019 01:27 AM
RE: HHC 2018 Programming Contests - 3298 - 10-05-2018, 08:26 PM
RE: HHC 2018 Programming Contests - 3298 - 10-06-2018, 12:07 PM
RE: HHC 2018 Programming Contests - 3298 - 10-06-2018, 04:21 PM



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