PROGRAM Pollution
!---------------------------------------------------------------------------------------
!Program that reads 3 pollution levels, calculates a pollution
!index as their integer average, and then displays an appropriate
!air-quality message. Identifiers used are:
! Level_1, Level_2, Level_3 : The three pollution levels
! Cutoff : a cutoff value that distinguishes between hazardous
! and safe conditions (parameter)
! Index : the integer average of the pollution levels
!
! Input: The three pollution levels and the cutoff value
! Constant: The cutoff value (parts per million)
! Output: The pollution index and a "safe condition" message if
this index is les than the cutoff value, otherwise a
"hazardous condition" message
!----------------------------------------------------------------------------------------
IMPLICIT NONE
INTEGER :: Level_1, Level_2, Level_3, Index
INTEGER, PARAMETER :: Cutoff=50
! Get the 3 pollution readings
PRINT *, "Enter 3 pollution readings (parts per million) :"
READ *, Level_1, Level_2, Level_3
! Calculate the pollution index
Index = (Level_1 + Level_2 + Level_3) / 3
! Check if the pollution index is less than the Cutoff and
! display an appropriate air-quality message
IF (Index < Cutoff) THEN
PRINT *, "Safe condition"
ELSE
PRINT *, "Hazardous condition"
END IF
END PROGRAM Pollution
여기까지가 제가 짠건데 계속 line14,15가 Not a valid FORTRAN statement 라고 뜨는데
어디가 잘못된건가요
봐도봐도 모르겠네요..
댓글 0