Mid Range Number

Date: 198x
Type: Program
Platform(s): TS 1000

Content

Appears On

Assembled by Tim Ward from many sources. Contains programs 10051 – 10121.

Related Products

Related Articles

Related Content

Image Gallery

Mid Range Number

Source Code

   5 REM %M%I%D% %R%A%N%G%E% %C%A%L%C%U%L%A%T%I%O%N
  10 LET N=0
  15 LET M=0
  20 LET H=0
  25 LET L=0
  27 PRINT "%M%I%D% %R%A%N%G%E% %N%U%M%B%E%R"
  28 PRINT 
  30 PRINT "ENTER A NUMBER (0 TO STOP) ";
  35 INPUT Z
  40 IF Z=0 THEN GOTO 90
  45 PRINT Z
  50 LET N=N+1
  55 IF N=1 THEN LET H=Z
  60 IF N=1 THEN LET L=Z
  65 IF Z<L THEN LET L=Z
  70 IF Z>H THEN LET H=Z
  80 GOTO 30
  90 LET M=L+((H-L)/2)
 100 CLS 
 110 PRINT "THE MID RANGE NUMBER IS ";M
 120 PRINT 
 130 GOTO 10
 150 SAVE "1005%4"
 160 RUN 

People

No people associated with this content.

Scroll to Top