Beep - Casio FX-795P Owner's Manual

Hide thumbs Also See for FX-795P:
Table of Contents

Advertisement

230
CHAPTER 8
Convenient DATA BANK Function
1008
110
120
130
140
159
1000
10108
18028
1630
READH
$,$
F=1
GOSUB
1000:
PRINT
$
GOTO
98
|F
F=@
THEN
PRINT
"No
Data
!!"
GOTO
280
FOR
J=1
TO
3
BEEP
1:
BEEP
@
NEXT
J
RETURN
197 bytes
® Variables Table
Variable name
Contents
I
Control variable for the FOR ~ NEXT loop
F
Z$(1) ~ ZS(3)
Stores the name entered.
$
For reading data
@ Execution Example
Operation
(vood (9) JL JN
8-9 Application to Tabular Calculations
Vertical and horizontal tabular calculations as shown below are frequently
required in practical calculations. Although this type of calculation was carried
out using the array (see page 102), tabular calculations can be simplified further
by considering the DATA BANK as being one large table.
n
m
Product A | Product
B { Product C | Product D
Horizontal
Branch X
5329
4280
3602
2310
Branch Y
2682
6313
4203
1128
Branch Z
5113
3229
5176
965
Vertical total
© Outline of the Program
Since the size of the table will be requested when this program is executed, enter
the number of horizontal items (m) and then the number of vertical items (n).
Enter data; one column at a time vertically from the top. "Calculation" is dis-
played and calculation starts after all data are input. When calculation is over,
the results are displayed in the order of vertical total and horizontal total.
©@ Program List
1@ BEEP
: INPUT
"(m
x n)",A,B:
ERAS
E F:
DIM
F(A+1,BH1)
2@
FOR
C=1
TOA
3@
FOR
D=1
TO
B
4@
PRINT
"C"SC3"x"s3DE")"G
5@ BEEP
: INPUT
F(C,D)
6O S="N"+
STRS(D)+", "+ STRS(F(C,D))
7@
|F A=C
THEN
$=$+",9"
8@ WRITEH
$
9@ NEXT
D
100 WRITEH
"M"+
STRS(C)+",6"
11@
NEXT
C
120
PRINT
"Calculation";
vy4® FOR
C=1
TO
Bt1
150
F(A+1,C)=0
231

Advertisement

Table of Contents
loading

Table of Contents