Case select season

Sristy · July 08, 2021
program main
implicit none 
integer:: month 
read*,month
print*,"enter the number of the Bengali month=",month

select case(month)
case(1:2)
print*,"summer"
case(3:4)
print*,"rainy season"
case(5:6)
print*,"Autumn"
case(7:8)
print*,"late Autumn"
case(9:10)
print*,"winter"
case(11:12)
print*,"spring"

case default
print*,"you’ve entered an invalid month  "

end select 
end program main
Output

Comments

Please sign up or log in to contribute to the discussion.