
PROGRAM if_statement_6
	IMPLICIT NONE

	! So far we have seen how programs are executed in sequence and how 
	! sections may be repeated. This program illustrates how decision/
	! control/options may be inserted into a program. When multiple 
	! choices have to be made Fortran code may be visualised as a 
	! decision tree.

	! declarations
	REAL :: temperature

	! inputs
	PRINT *,'Enter the temperature in degrees Celsius'
	READ *,temperature

	! a blockIF construct (and note the indentation)
	IF ( temperature < 0.0 ) THEN
	   PRINT *,'It is very cold'
	ELSE IF ( temperature < 35.0 ) THEN
	   PRINT *,'It is a reasonable temperature'
	ELSE 
	   PRINT *,'It is very hot'
	ENDIF

END PROGRAM if_statement_6
