This Is Input, Answer Please - Sharp MZ-80A Owner's Manual

Hide thumbs Also See for MZ-80A:
Table of Contents

Advertisement

29
ing
the
FN
|
This is
INPUT, Answer
Please
To inform the
computer
of variables' values, we
have
so
far taken the method where the value is first determined,
as
follows:
10
A
=
3
20 B
=
5
There
are several
methods available for informing the
computer
of the values
of variables. One of
them
uses a
command called INPUT.
10 INPUT
A,
B,
C
20 D
=
A
+
B
+
C
30 PRINT
A,
B,C,D
40 END
RUN
?
flf
This is
new
display, isn't it? ?
£?
is making an inquiry
to
you about the value of first variable A following the
INPUT
command. In response
to
this inquiry, key-in the value and
press
the
[CR
key
to
inform the
computer
that everything is
OJC.
1C1MPITA81
?
13 CUCH
[eg
j
r
?
BUHIHCR)
?_0(lEI(cE
The
sequence
of
values
the
computer
will
ask about is in
the order
of
how the
variables are
arranged.
Fr.
I f
you make
a
mistake
in
response to the
question,
just prese
the
INST
OEk_
key.
The
answer
is
O.K..
and
then
press
the |CR ;
key
to
confirm
to
that
effect.
Look!
The
same
display
is
there. This
is the
inquiry about the value
of
the second variable B.
If
there
are 3
vari¬
ables,
the
computer
asks question 3
times.
If you
reply
using
any key other than
0
to
9 by mistake, and
press
the CR
key, the following is displayed.
Error
4
in 10
. . . . . . . . . . . . . . . .
Data
type
mismatch
The computer will then make inquiries about the values
all over
again.
10 INPUT
A,
B,C,D
10
INPUT
"A
=
?"
; A
20 INPUT
E.F.G.H
20 INPUT
"B
=
?"
; B
30
PRINT H.G,F,E
30 INPUT "C
=
?"
;C
40
PRINT
D, C,
B.
A
40 S=
A+
B + C
50
END
50
tn
0)
li
2
60
PRINT
'
TOTAL''
;
70 END
MEAN''
;M

Advertisement

Table of Contents
loading

Table of Contents