SUBROUTINE2

 !Program name: SUBROUTINE2

program subroutine

implicit none

   real :: x, y, z, disc

   x = 1.0

   y = 5.0

   z = 2.0

 

   call discriminant(x, y, z, disc)

 

   Print *, "The value of the discriminant is"

   Print *, disc

end program subroutine

 

subroutine discriminant (a, b, c, d)

implicit none

 

   ! dummy arguments

   real :: a

   real :: b

   real :: c

   real :: d

 

   d = b * b - 4.0 * a * c

 

end subroutine discriminant

Comentários

Postagens mais visitadas deste blog

HYDROGEN-RADIAL

HYDROGEN-POTENTIAL

ONE_PART_QHO