EasyManuals Logo

Casio FX-730P User Manual

Casio FX-730P
228 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #76 background imageLoading...
Page #76 background image
66
CHAPTER
4 Programming
with
BASIC
Language
Using Arrays with the
DIM
Mode
In this example, we will process two types
of
data
by
using two-dimensional
array variables.
Example:
Store the names and heights
of
15
people.
P0
10
DIM A$(
1,
14)
20
FOR
C=0
TO
14
30
INPUT
"NAME'',
A$
( 0
'c
)
40
INPUT
"HEIGHT''
,A$(
1
,C)
50
NEXT
C
60
END
p 1
10
INPUT
"NAME'',
N$
20
FOR
C=0
TO
1 4
30
IF
N$=A$(0,C>
THEN
PRINT
A$(1,C>;"cm~:GOTO
10
40
NEXT
c
50
PRINT
''NO
NAME''
60
GOTO
10
Input the names and heights to
PO
since this
is
the input program.
Pl
is
the
program to display the height
of
the pertinent person when a name
is
entered.
Variable C
is
used for controlling the
FOR~
NEXT loop and variable
N$
is
used
for temporary storage when searching a name.
Array
A$
(0, 0)
~A$
(0, 14)
is
an array variable to store the names
of
15
people
and array
A$
(1, 0)
~
A$
(1, 14)
is
an array variable to store the heights
of
15
people.
*On line 30 in
Pl,
when the name
of
the input person
is
concerned, his height
is
displayed. Then execution
is
jumped
to
line 10. To input a different name,
press
the§!
key when the height
of
previous person
is
displayed.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Casio FX-730P and is the answer not in the manual?

Casio FX-730P Specifications

General IconGeneral
BrandCasio
ModelFX-730P
CategoryDesktop
LanguageEnglish

Related product manuals