List Of School Work Results - Sharp MZ-80A Owner's Manual

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

Advertisement

8S
|
List of School Work Results
This is a program
lor
recording
the results of
French,
English and science for a
certain
class.
10
20
30
40
50
60
70
80
90
100
120
130
140
150
160
170
180
INPUT
"HOW MANY STUDENTS IN
THE CLASS?
"
;
N
DIM
N$ (N),
K (N), E (N)
DIM R (N)
AS
=
"
(MARKS)
"
FOR X
=
1 TO N
PRINT
:
PRINT X
INPUT "NAME PLEASE ?
"
;
NS
(X)
PRINT "FRENCH
" ;
AS
; :
INPUT K
(X)
PRINT "ENGLISH"
;
AS
;
: INPUT E (X)
PRINT "SCIENCE"
;
AS
; :
INPUT R (X)
NEXT X
WOPEN/T
"
RESULT "
«
PRINT/T
N
«
-
FOR X
=
1
TO N
PRINT/T
NS
(X),
K
(X)
.
E
(X). R
(X)
<
NEXT
X
CLOSE/T
«
-
-
For writing a data group
named
"RESULT".
-
Writing the number of students in the class.
-
Writing
the marks for students.
Writing completed.
Now,
let's
read the written data of
results,
and calculate the mean of individual students'
points and the
mean of
each subject.
10
ROPEN/T
"
RESULT
"
<
-
20
INPUT/T
N
«
-
30 DIM
N$ (N),
K (N), E
(N)
40 DIM
R
(N)
50 FOR X
=
1 TO N
60
INPUT/T
NS
(X), K (X)
70
INPUT/T
E
(X).
R (X)
<
-
80 NEXT X
90
CLOSE/T
«
-
100
PRINT TAB
(1 2)
;"
FRENCH" ;
110 PRINT TAB (19)
;
"ENGLISH"
;
120
PRINT TAB
(27) ;
"SCIENCE" ;
1 30
PRINT
TAB
(34) ;
"MEAN"
140 FOR X
=
1 TON
150
PRINT NS
(X)
;
TAB (11)
;
K
(X)
;
160 PRINT TAB (18) ;E(X)
;
170
PRINT TAB
(26) ;R(X) ;
190
PRINT TAB
(33)
;
INT
(10/3
*
(K
(X)
+
E
(X)
+
R (X))>
/
10
200 K (0)
=
K (0)
+
K
(X) :
E
(0)
=
E
(0) +
E
(X)
210 R (0)
=
R (0)
+
R (X)
220 NEXT X
:
PRINT
" MEAN"
;
230
PRINT
TAB (1 1)
;
INT (10
*
(K(0)/N))/ 10 ;
240
PRINT TAB
(18) ;
INT
(10
*
(E(0)
/N
))/ 10
;
250
PRINT
TAb (26) ;
INT
(10
*
(R
(0)
/
N))
/
10
260 END
-For
finding
the data group named
"
RESULT
".
Readouts of the
number
of students in the class.
Readouts of the
name
and marks for French.
Readouts of marks for
English
and science.
Readouts
completed.

Advertisement

Table of Contents
loading

Table of Contents