EasyManuals Logo

Radio Shack TRS-80 Model 100 User Manual

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
Page #147 background imageLoading...
Page #147 background image
Modify the program from experiment 6 by changing lines 10 through 50 to:
10
N
=
8
20
FOR
W=l
TO
8 :
FOR
0=1
TO
5
30
INPUT
:1*
1 t
R(
W
,0)
L10
NEXT
0
:
NEXT
W
50
FOR
0=1
TO
5
.
FOR
W=l
TO
8
.
and enter the new lines 60 through 150
80 S(W) = R(WtO)
70
NEXT
W
80
GOSUB
500
80
M(O)
=
MO
100
NEXT
0
110
PRINT TAB(10)
"MEDIAN
SALES"
120
PRINT"
MON
TUE
WED
THU
FRI"
130
FOR
0=1
TO
5:PRINTTAB«0-1)*7)M(0);
1L10
NEXT
0
150
END
and change line
57lil
to
570
RETURN
List the program to confirm that it is now:
5
OPEN
"RAM:SALEOA.OO"
FOR
INPUT
AS
1
10 N = 8
20
FOR
W = 1
TO
8 :
FOR
0 = 1
TO
5
30
INPUT:I*
1t
R(W,O)
L10
NEXT
0 :
NEXT
W
50
FOR
0 = 1
TO
5 :
FOR
W = 1
TO
8
80
S(W) = R(W,O)
70
NEXT
W
80
GOSUB
500
80
M(O)
=
MO
100
NEXT
0
110
PRINT TAB(10)
"MEDIAN
SALES"
120
PRINT"
MON
TUE
WED
THU
FRI"
130
FOR
0=1
TO
5:PRINTTAB«0-1)*7)M(0);
1L10
NEXT
0
150
END
500
FOR
I = 1
TO
N - 1
510
FOR
J = 1
TO
N - I
520
IF
S(J)
<
S(J+1)
GOTO
5L10
530
S=S(J)
:
S(J)=S(J+1)
:
S(J+1)=S
5L10
NEXT
J :
NEXT
I
550
N1=INT«N+1l/2)
:
N2=INT«N+2)/2)
580
MO
=
(S(Nll
+ S(N2» / 2
570
RETURN
141

Other manuals for Radio Shack TRS-80 Model 100

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Radio Shack TRS-80 Model 100 and is the answer not in the manual?

Radio Shack TRS-80 Model 100 Specifications

General IconGeneral
BrandRadio Shack
ModelTRS-80 Model 100
CategoryDesktop
LanguageEnglish

Related product manuals