Numbers (The Plotter)

Developer(s): Dick Wagner
Date: 1993
Type: Program
Platform(s): TS 2068

A number puzzle: pick a whole number from 1 to 100 and type it in, then work out A = N/3, B = A/5 and C = B/7 by hand (to at least three places) and type in each result. The program finds the number again from C alone, with N = INT (70*C+21*C+15*C), that is 106 times C, and shows the sum with your C put in.

Round C rather than cutting it off: with C cut off at three places a small number can come out one too low (1 gives .009, and the answer 0).

The author wrote it to replace a program in the April 1987 Plotter that did not work.

Published in The Plotter January 1993 (Numbers).

Image Gallery

Source Code

  10 PRINT "SELECT AN INTEGER NUMBER 1  TO  100. CALL IT N. MAKE THE FOLLOW-ING CALCULATIONS, CARRIED OUT   AT LEAST 3 PLACES, AND I WILL   TELL YOU THE NUMBER. THE        CALCULATIONS ARE FOR A, B, AND C.": INPUT N: PRINT N
  30 PRINT "N/3= A  ";: INPUT A: PRINT A
  40 PRINT "A/5= B  ";: INPUT B: PRINT B
  60 PRINT "B/7= C  ";: INPUT C: PRINT C
  80 LET N=70*C+21*C+15*C
  90 FOR Z=1 TO 5
 100 IF N>105 THEN LET N=N-105
 110 NEXT Z
 120 PRINT AT 12,6;"YOUR NUMBER IS ";INT N
 125 PRINT
 130 PRINT "N=INT (70*C+21*C+15*C)"
 140 PRINT "N=INT (70*";C;"+21*";C;"+15*";C;")"

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.