PROGRAM HurricaneIF

! Written by Kate T-C
! August 27, 2009  For the Fortran Short Course
! This program demonstrates an IF/Then/ElseIF/Else block
!   and random number generation in Fortran

implicit none

real :: harvest=0.0, t2=0.0
integer, dimension(8) :: time
integer :: rand

	call date_and_time(values=time)
	call random_seed(put=time(8:8))
	call random_number(harvest)

	rand = floor(harvest*1000)


	print *, 'The intensity of Tropical Storm Danny will be....'

	if(rand <= 1) then
		print *, 'Tropical Storm'
	else if(rand <= 3) then
		print *, 'Catagory 1'
	else if(rand <= 5) then
		print *, 'Catagory 2'
	else if(rand <= 7) then
		print *, 'Catagory 3'
	else if(rand <= 9) then
		print *, 'Catagory 4'
	else
		print *, 'Catagory 5!!'
	endif

END 
