Publication: Syntax
Pub Details: Syntax/Syntax ZX80 v2 n10 (Volume 2, Issue 10)
Date: October 1981
Pages: 4
Just in time for fall–this 4K/1K program helps teachers average grades at the end of the grading period. It uses the high precision division routine in the 4K ZX80 manual.
Type it in, then run. Enter the gradebook page number in response to the first prompt, then the line number to identify each student. After you enter all the grades for any student, type any negative number (greater than -32768) as the last grade. The program jumps to the division routine and calculates the average to three decimal places. To go on to the next student, hit CONT (NL) CONT(NL).
1 PRINT "GRADEBOOK PAGE NUMBER IS ";
2 INPUT PG
3 PRINT PG
4 PRINT "GRADEBOOK LINE NUMBER IS ";
5 INPUT ID
6 PRINT ID
10 LET N=0
20 LET G1=0
25 PRINT "GRADE"
30 INPUT G
40 IF G<0 THEN GO TO 300
50 PRINT G
60 LET N=N+1
70 LET G1=G+G1
80 GO TO 30
300 LET X=G1
310 LET Y=N
320 LET Z=X/Y
330 LET R1=X-Z*Y
340 LET D1=10*R1/Y
350 LET R2=10*R1-D1*Y
360 LET D2=10*R2/Y
370 LET R3=10*R2-D2*Y
380 LET D3=10*R3/Y
390 PRINT "THE AVERAGE IS---";Z;".";D1;D2;D3
400 STOP
410 GO TO 2
Syntactic Sum: 26666, 4K
Media
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.