REAL DATA(300) REAL AVG INTEGER NDATA,K READ(*,*) NDATA DO K=1,NDATA READ(*,*) DATA(K) END DO DO K=1,NDATA WRITE(*,*) DATA(K) END DO WRITE(*,*) "Average=",AVG END !============================ SUBROUTINE HEIKIN(N,A,B) REAL A(300),B,TMP,SUM INTEGER N,K TMP=0.0 DO K=1,N TMP=TMP+A(K) END DO SUM=TMP B=SUM/REAL(N) RETURN END