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

! Example 2.4. More assignment statements.
  program C04
    implicit none
    real, parameter :: A = 1.234, B = 5.567
    real :: Average_1, Average_2
    integer, parameter :: I = 139, J = 245, K = 7
    integer :: Mean, Negation, Identity
! start program C04
    Average_1 = (A + B) / 2.0  ! Assignment statements
    Average_2 = 0.5 * (A + B)
    Mean = (I + J) / 2
    Negation = -I * (-J / (-K))
    Identity = +I * (+J)
    write (unit = *, fmt = *) Average_1, Average_2, Mean, Negation, Identity
    stop
  end program C04
