Here is another math puzzle from Marilyn Vos Savant. The puzzle description is hers, the program is mine. The program is not essential to solving it, but it makes it more interesting.
“In a small Swiss village, there was an enormous old clock on a tower that loomed over the market square. One day a storm blew off the clock and sent it sailing away, until it crashed in an empty field. The town watchmaker, who had been out of work since everyone went digital, forlornly watched the clock hit the ground and break neatly in half. However, he also noticed something unusual about it, so he buried the pieces and created the following puzzle, which he hoped would restore his fame and fortune: how was the clock face split so the six numerals on each half added up to the same total??”
1 REM
10 PRINT "THE BROKEN CLOCK FACE"''
20 REM BY DICK WAGNER, 7/94
100 PRINT "Enter numbers from this list that will add up to 1/2 of the clock face."''
110 FOR H=1 TO 12
120 PRINT H
125 NEXT H
128 PRINT : PRINT "Input your choice of 6 numbers."
130 INPUT A: INPUT B: INPUT C
140 INPUT D: INPUT E: INPUT F
200 LET T=A+B+C+D+E+F
210 PRINT : PRINT "THE SUM IS ";T
300 IF T<>39 THEN PRINT "TRY ANOTHER COMBINATIOn. Press RUN"
310 IF T=39 THEN PRINT "CORRECT, THIS IS 1/2 OF THE CLOCK FACE"
320 IF T=39 THEN PRINT "THE OTHER HALF OF THE NUMBERS IS 10,11,12,1,2,3, OR 4,5,6,7,8,9 "
Editor’s Note: When making a LLISTing with JLO systems, I use LET /P=O, POKE 23324,10 for line feed, and POKE 23323,32 for line length (32). If the first line is over 32 characters I usually add a 1 REM to initialize the printer so line length will stop at 32.
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.