12.07.2015 Views

page-1983-101-timex-sinclair-programming-tricks

page-1983-101-timex-sinclair-programming-tricks

page-1983-101-timex-sinclair-programming-tricks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

70 GOTO 2080 CLS90 PRINT "THE SMALLEST NUMBER WAS •;n100 IF INKEY$=•• THEN GOTO 100110 CLS120 GOTO 1053 Which is Largest?Suppose you have a group of numbers and you wouldlike to know which number is largest within the group?Here's a software routine for your TIMEX so it can locatethe largest number.You can key in as many numbers as you wish. To endthat entry cycle, type in a zero. The computer will see thatzero as its cue to leave the entering routine and get onwith computing.Press any key to restart .Program Listing10 LET N=J15 LET H=J20 PRINT •GIVE ME A NUMBER n ,•25 INPUT Z30 IF Z=J THEN GOTO 8035 PRINT Z40 LET N=N+l50 IF :N=l THEN LET H=Z60 IF Z>H THEN LET H=Z70 GOTO 2080 CLS90 PRINT •THE LARGEST NUMBER: n ;H100 IF INKEY$=•• THEN GOTO 100110 CLS120 GOTO 1072

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!