10 PRINT "LINEAR INTERPOLATION"
20 PRINT
29 REM - ENTER X- AND Y-COORDINATES OF TWO POINTS ON THE LINE
30 PRINT "X,Y OF FIRST POINT";
40 INPUT X1,Y1
50 PRINT "X,Y OF SECOND POINT";
60 INPUT X2,Y2
69 REM - ENTER X-COORDINATE OF POINT TO BE INTERPOLATED
70 PRINT "INTERPOLATE: X=";
80 INPUT X
89 REM - COMPUTE CORRESPONDING Y-COORDINATE
90 Y=Y1+(Y2-Y1)/(X2-X1)*(X-X1)
99 REM - ROUND OFF, PRINT
100 PRINT "             Y = ";INT(Y*1000+.5)/1000
110 PRINT
120 PRINT "MORE POINTS ON THIS LINE (1=yes, 0=NO)";
130 INPUT Z
140 PRINT
150 IF Z=1 THEN 70
159 REM - INTERPOLATE ON ANOTHER LINE?
160 PRINT "NEW LINE (1=YES, 0=NO)";
170 INPUT Z
180 IF Z=1 THEN 20
190 END
