Radio Shack TRS-80 Operation Manual page 136

Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

Computer Graphics
Operation Manual
- - - - - - - - - - - T R S - B O
® - - - - - - - - - -
5~~
'
5l~
'Input gross income, and calculate the Y-coordinate
52~
'
53~
FOR I=l TO 12
54~
CLS
55~
PRINT "Enter gross income in millions (1-9) for "iMN$(I)
56~
LINE INPUT "$"iGI$
57~ Y(I)=2~5-2~*VAL(GI$)
58~
TTINC=TTINC+VAL(GI$)
59~
NEXT I
6~~
CLR
61~ SCREEN~
62~
'
63~
'Draw the graph and bars
64~
'
65~
FOR I=l TO 12
66~
CLS
67~ X=X+5~
68~
LINE
(X,Y(I»-(X+2~,2~5),1,BF
69~
LINE
-(X+4~,195)
7~~
LINE
-(X+4~,Y(I)-1~)
7l~
LINE
-(X+2~,Y(I)-1~)
72~
LINE -(X,Y(I»
73~
LINE
(X+2~,Y(I»-(X+4~,Y(I)-1~)
74~
PAINT(X+21,Y(I)+2),TILE$,1
75~
NEXT I
76~ GLOCATE(4~,2l5),~
77~
PRINT #-3,"Jan
Feb
Mar
Apr
May
June
July
Aug
Nov
Dec"
78~ GLOCATE(29~,23~),~
79~
PRINT #-3,BMSG$
8~~
FOR I=l TO
l~
81~
IF I>9 THEN C=l ELSE C=2
82~ GLOCATE«C*1~)-5,(2~-I*2)*1~),~
83~
PRINT #-3,STR$(I)i"-"
84~
NEXT I
85~
LINE
(35,~)-(35,2~5)
86~
LINE
-(639,2~5)
87~ GLOCATE(~,18~),3
88~
PRINT #-3,VMSG$
89~ GLOCATE(22~,~),~
9~~
PRINT #-3,TMSG$
9l~ GLOCATE(26~,1~),~
92~
PRINT #-3,"(Total income is''iTTINCi" million)"
93~
FOR I=l TO
l~~~~
94~
NEXT I
95~
SCREENl
96~
END
Sept
Oct
- - - - - - - - - l I a d l O l h a e l l - - - - - - - - -
-132-

Advertisement

Table of Contents
loading

Table of Contents