C     PROGRAM TO COMPUTE SUM OF SQUARES
      PROGRAM SUMSQ
      INTEGER N, I, SUM
      REAL AVG
      DIMENSION ARRAY(10)
      DATA ARRAY /1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0/
C     INITIALIZE SUM
      SUM = 0
      N = 10
C     COMPUTE SUM OF SQUARES
      DO 10 I = 1, N
         SUM = SUM + ARRAY(I) * ARRAY(I)
   10 CONTINUE
C     COMPUTE AVERAGE
      AVG = FLOAT(SUM) / FLOAT(N)
C     PRINT RESULTS
      WRITE(6,20) SUM, AVG
   20 FORMAT(' SUM OF SQUARES = ', I5, ' AVERAGE = ', F8.2)
      STOP
      END
