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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sample RunCOUNTING0: 8l: l 02: 143: 164: 6COUNTING0: 6l: 122: 113 : l 34: 765 Random Numbers:AveragesThis program generates 100 random numbers andtotals them. Then it finds the average of all 100 numbers.In fact, the average number itself is a useful new randomnumber.Program Listing10 LET A=fl20 LET N=fl30 LET T=fl40 FOR L=l TO 10050 PRINT nAVERAGING"60 LET N=INT(lO*RND)70 LET T=T+N80 CLS90 NEXT L100 LET A=T/10081

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

Saved successfully!

Ooh no, something went wrong!