EasyManua.ls Logo

Radio Shack TRS-80 Model 100 - Page 91

Radio Shack TRS-80 Model 100
210 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
Loading...
Press
(BKSP)
and then
CD,
to change the 6 to a
7.
These two lines will now appear as:
60
PI~I!\IT
70
P!~~I!'rf"
"
.c'\'-v'ERl\(;;iE
"
AVEI~AGE
I
F~
If
~
.,.
f"'~
H u
1
~~
'J
t.\)/
,6,"/
i
cr~
Line 70 is in the desired form. Move the cursor to line 60 so that it is on the space
after AVERAGE. Line
60
will appear as:
6iZ!
PRI
NT
II AVE
!'I;~jl:::.!'!lF!j"
~:;"
~
,tV).I
CT.
Press
(BKSP)
until the word AVERAGE is erased. Then type in the word SUM. Line
60
will be:
60
PRINT
"SUM
IS";
AV/
The last step is to delete the characters
"/CT"
at the end
of
the line. Move the cursor
to the end
of
the line so that it is over the carriage return character0
6
r
1>
FjR
I
I,.,oor
"CUlv' I
Co".
A'
J i
('OOf".·"··
l,(J
i~
-...J
11
~_,
~
.
\0'.'
'-'
. .
Press
~
three times to erase the characters. Line 60 will be in the desired form
60
PRINT
"8UM
IS";
Av4
Exit from the Editor. List the program to confirm that it is:
1121
INPUT
"NUMBER";
N
2121
IF
N=12I
THEN
GOTO
SI2I
ELSE
CT
=
CT
+ 1
1112l
AV
=
AV
+ N
5121
GOTO
1121
SI2I
PRINT
"SUM
IS";
AV
7121
PRINT
"AVERAGE
IS";
AV/CT
Execute the program. Here is an example
of
the output:
NUMBER?
·4
NUMBER'7 2
NlJl"IJ3ER? 0
SUi'1
T
E)
6
A\,JE
::-~ACiE
I
~3
3
Recall that
if
a BASIC program is
SA
VEd in RAM but changes are made to it when
the program is LOADed in working memory, the program SAVEd in RAM will
reflect those changes0
85

Other manuals for Radio Shack TRS-80 Model 100

Related product manuals