10 GOSUB 100
20 REM GOSUB 500
90 END
100 REM
101 REM Conditionals and stuff
102 REM
104 LET I=I+1
105 PRINT "Looping...";
106 PRINT I
110 IF I=5 THEN GOTO 150
120 GOTO 104
150 PRINT "Done"
160 RETURN
500 REM 
501 REM Arrays and random numbers
502 REM
505 PRINT "Distribution of 100 random numbers 1-10:"
510 FOR I=0 TO 99
520 LET NUMBER=RND(10)
530 LET ARR(NUMBER)=ARR(NUMBER)+1
540 NEXT I
545 FOR I=0 TO 9
546 PRINT "The number ";
547 PRINT I;
548 PRINT " was seen ";
560 PRINT ARR(I);
565 PRINT " times"
570 NEXT I
590 RETURN
