Trailing-Edge
-
PDP-10 Archives
-
-
There are no other files named in the archive.
C THIS PROGRAM COMPUTES THE WEIGHTED AVERAGES OF N TEST
C SCORES . ALSO THE AVERAGE OF EACH TEST. SCORES ARE
C ASSUMED TO BE STORED IN IB(7) THRU IB(7+NTEST-1)
COMMON IDF,LFR,NAVR,MAXR,NSPR,LSR,LFMT,NCPR,LPFR,DATME
COMMON IFRMAT(3,6)
DIMENSION IB(20),B(20),WEIGHT(20),TOTALS(20)
EQUIVALENCE(IB(1),B(1))
FILE=ANSWER('FILE ID?')
CALL SLECTF(FILE)
INDX1=IFRMAT(1,3)
NTEST=NANSWR('HOW MANY TESTS TO AVERAGE?')
INDX2=INDX1+NTEST-1
C READ IN CATEGORY PROMPTS
CALL DIO(LFR-NSPR,1,IB,NSPR)
TYPE 100
100 FORMAT(1X,'INPUT WEIGHTS'/)
DO 1 I=1,NTEST
TYPE 101,IB(IFRMAT(1,I+2))
101 FORMAT(1X,A5,1X$)
1 ACCEPT 102,WEIGHT(I)
102 FORMAT(F)
TYPE 105,(IB(IFRMAT(1,I+2)),I=1,NTEST)
105 FORMAT(1H1,32X,'FINAL ',6A6)
C LOOP THRU ALL STUDENTS IN FILE
DO 2 LSR=LFR,NAVR-NSPR,NSPR
CALL READR(IB)
FINAL=0.0
K=0
DO 3 I=INDX1,INDX2
K=K+1
TOTALS(K)=TOTALS(K)+IB(I)
3 FINAL=FINAL+WEIGHT(K)*IB(I)
TOTALS(NTEST+1)=TOTALS(NTEST+1)+FINAL
2 TYPE 103,(IB(I),I=1,6),FINAL,(IB(I),I=7,INDX2)
103 FORMAT(1X,I5,1X,5A5,F6.1,6I6)
DO 4 I=1,NTEST+1
4 TOTALS(I)=TOTALS(I)/((NAVR-LFR)/NSPR)
TYPE 104,TOTALS(NTEST+1),(TOTALS(I),I=1,NTEST)
104 FORMAT(1H0,'CLASS AVERAGES',18X,5F6.1)
CALL EXIT
END