10 PRINT "STOCK RECORD"
11 PRINT "DO YOU WANT TO PRINT THE TABLE OF PRICES ON THE SCREEN"
12 PRINT "INSTEAD OF AT THE PRINTER";:INPUT V$
13 IF V$="Y" THEN GOSUB 500 
14 PRINT "NAME OF STOCK";:INPUT Z$
15 LPRINT "*************";Z$;"*************"
16 PRINT "ENTER DATE";:INPUT Y$
17 LPRINT "DATE PREPARED: "; Y$
20 LPRINT:LPRINT "WEEK", "PRICE", "GAIN/LOSS"
30 S=0:D=0
31 Z=0
40 REM
45 I=0
50 I=I+1
60 READ W
70 IF I=1 THEN 110
80 IF W<0 THEN 140
90 D=W-W1
100 S=S+D
110 LPRINT I,W,D
120 W1=W
121 Z=Z+W
130 GOTO 50
140 LPRINT "AVG. WEEKLY CHANGE:";S/(I-1);"POINTS"
160 LPRINT "TOTAL CHANGE:      ";S;"POINTS"
161 LPRINT "AVERAGE PRICE:    $";Z/(I-1)
170 LPRINT:LPRINT
171 PRINT "HAVE YOU ALREADY ENTERED STOCK NAME AND DATE":INPUT T$
172 IF T$="Y" THEN GOTO 260
173 PRINT "NAME OF STOCK";:INPUT Z$
174 LPRINT "*************";Z$;"*************"
175 PRINT "ENTER DATE";:INPUT Y$
176 LPRINT "DATE PREPARED: "; Y$:LPRINT:LPRINT:
260 PRINT:PRINT "SET RANGE FOR GRAPH"
270 A=0:B=0:C=0
280 PRINT "WHAT IS THE SMALLEST NUMBER YOU WANT";
281 INPUT A
282 PRINT "WHAT IS THE LARGEST NUMBER YOU WANT";
283 INPUT B
284 PRINT "STEP 1, 5 OR 10";
285 INPUT C
286 PRINT "DO YOU WANT TO TEST GRAPH ON SCREEN BEFORE PRINTING":INPUT R$
287 IF R$="Y" THEN GOSUB 715
303 GOSUB 315
305 PRINT "WANT ANOTHER GRAPH";: INPUT A$
307 IF A$="Y" THEN 270
309 GOTO 999
315 REM
316 X=0
317 REM
330 FOR I=A TO B STEP C
340 LPRINT TAB(X*70*(C/(B-A))+5);I;
350 X=X+1
360 NEXT I
370 LPRINT
375 REM
380 LPRINT "   |";
390 FOR I=0 TO (X-1)
400 LPRINT TAB(I*70*(C/(B-A))+7);"+";
410 NEXT I
420 LPRINT
425 RESTORE
428 REM
429 I=0
430 I=I+1
440 READ W
450 IF W<0 THEN 480
460 LPRINT I;TAB((W-A)*(70/(B-A))+6);"*"
470 GOTO 430
480 RETURN
500 PRINT:PRINT "WEEK", "PRICE", "GAIN/LOSS"
501 S=0:D=0
502 Z=0
503 REM
504 I=0
505 I=I+1
510 READ W
520 IF I=1 THEN 560
530 IF W<0 THEN 590
540 D=W-W1
550 S=S+D
560 PRINT I,W,D
570 W1=W
571 Z=Z+W
580 GOTO 505
590 PRINT "AVG. WEEKLY CHANGE:";S/(I-1);"POINTS"
591 PRINT "TOTAL CHANGE:      ";S;"POINTS"
592 PRINT "AVERAGE PRICE:    $";Z/(I-1)
593 PRINT "DO YOU WANT TO PRINT THE TABLE NOW":INPUT U$
594 IF U$="Y" THEN RESTORE ELSE GOTO 171
595 RETURN
715 REM
716 X=0
717 REM
730 FOR I=A TO B STEP C
740 PRINT TAB(X*70*(C/(B-A))+5);I;
750 X=X+1
760 NEXT I
770 PRINT
775 REM
780 PRINT "   |";
790 FOR I=0 TO (X-1)
800 PRINT TAB(I*70*(C/(B-A))+7);"+";
810 NEXT I
820 PRINT
825 RESTORE
828 REM
829 I=0
830 I=I+1
840 READ W
850 IF W<0 THEN 880
860 PRINT I;TAB((W-A)*(70/(B-A))+6);"*"
870 GOTO 830
880 PRINT "DO YOU WANT TO PRINT GRAPH NOW":INPUT P$
881 IF P$="N" THEN 260
890 RETURN
998 DATA -1
999 END

870 GOTO 830
880 PRINT "DO YOU WANT TO PRINT GRAPH NOW":INPUT P$
881 IF P$="N" THEN 260
890 RETURN
9