A brick puzzle from Marilyn vos Savant’s column: all the bricks weigh the same, and a brick weighs 4 pounds plus half a brick. How much does a brick and a half weigh? Type your answer; a wrong one clears the screen, prints WRONG, TRY AGAIN and asks again, the right one (12 pounds) gets GOOD THINKING, YOU ARE CORRECT.
Published in The Plotter January 1993 (Math Game).
Source Code
10 REM by Dick Wagner, Nov. 1992
20 PRINT "THIS QUESTION IS BASED ON THE PREMISE THAT ALL OF THE BRICKS INVOLVED WEIGH EQUALLY."
25 LET W=4
30 LET B=2*W
40 LET C=B+W
50 PRINT "IF A BRICK WEIGHS 4 POUNDS PLUS A HALF A BRICK, HOW MUCH DOES A BRICK AND A HALF WEIGH?";: INPUT C
60 CLS : IF C<>B+W THEN PRINT "WRONG, TRY AGAIN": GO TO 25
65 PRINT : PRINT
70 IF C=B+W THEN PRINT "GOOD THINKING, YOU ARE CORRECT"Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


