! Program Example from "Essential Fortran 90 & 95" by Loren P. Meissner
! Copyright 1996 PWS Publishing. Copying for sale requires permission from PWS.
! Otherwise, distribution is permitted if these three lines are included.

! Example 3.19. Fall and spring semesters, by months.
  program D19
    implicit none
    integer :: M
! start program D19
    write (unit = *, fmt = *) " Please enter a month number between 1 and 12. "
    read (unit = *, fmt = *) M
    select case (M)
      case (9: 12, 1)
        write (unit = *, fmt = *) " Month ", M, " is in the fall semester. "
      case (2: 6)
        write (unit = *, fmt = *) " Month ", M, " is in the spring semester. "
      case default
        write (unit = *, fmt = *) " School is not in session during month ", M
    end select
    stop
  end program D19
