3H
?>F >>
^d1 This is a LORES graphics demonstration which
n4 accepts input data in numerical form, and gives
x/ a representation of this in BAR CHART form
- M0(12) : Holds the data for each month
3 "Enter your input data for each of the twelve"
' "months just using integer values"
) "Use numbers less than 10000 please"
6 Get the data for each month in turn from operator
* and find the maximum at the same time
) M1=0 : set maximum to zero for start
! A=0 : index to maximum entry
I=1 12
"Data for month ";I;
M0(I)
M0(I)>M1 M1=M0(I):A=I
I
: now scale the graph so that the largest entry,indexed
"& to by A takes up the whole screen
, S0=42/M1 : use 42
6 now print out the columns
@ :
J
I=1 12
T fill in one bar
^( (S0*M0(I))=0 5*I-2,15 : 410
h J=5 12
r, 10*(I-1)+J,3 10*(I-1)+J,(S0*M0(I))
| J
' print the value above the bar ...
" 5*I-2,15-(S0*M0(I)/42*14+1)
C=(M0(I))
[I4 C];
I
1,16
E " Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec";
0
460
:(H-1,J):(H-2,J):(H-3,J)
P=H+4:W=J
P,W:P