REAL DATA(300) REAL DATAMAX,DATAMIN INTEGER NDATA,K READ(*,*) NDATA DO K=1,NDATA READ(*,*) DATA(K) END DO CALL                 CALL                 DO K=1,NDATA WRITE(*,*) DATA(K) END DO WRITE(*,*) "Maximum=",DATAMAX WRITE(*,*) "Minimum=",DATAMIN END !============================ SUBROUTINE SAIDAI(N,A,B) REAL A(300),B,TMP INTEGER N,K TMP=A(1) DO K=2,N IF(A(K).GT.TMP) THEN TMP=A(K) ENDIF END DO B=TMP RETURN END !============================ SUBROUTINE SAISHO(N,A,B) REAL A(300),B,TMP INTEGER N,K TMP=A(1) DO K=2,N IF( A(K).LT.TMP ) THEN TMP=A(K) ENDIF END DO B=TMP RETURN END