module calculate_volume
  implicit none
  public :: cvolume
  real, parameter :: pi=3.14159
  interface cvolume
    module procedure ivolume
    module procedure fvolume
    module procedure dvolume
  end interface
contains
  function ivolume( radius )
    implicit none
    real :: ivolume
    integer, intent(in) :: radius

    ivolume=4.0/3.0*pi*radius**3

    return
  end function ivolume

  function fvolume( radius )
    implicit none
    real :: fvolume
    real, intent(in) :: radius

    fvolume=4.0/3.0*pi*radius**3

    return
  end function fvolume

  function dvolume( radius )
    implicit none
    real :: dvolume
    real(kind=8), intent(in) :: radius

    dvolume=4.0/3.0*pi*radius**3

    return
  end function dvolume
end module calculate_volume

program ans_11_01
  use calculate_volume
  implicit none
  integer :: iradius=1
  real(kind=4) :: fradius=1.0
  real(kind=8) :: dradius=1.0

  write(*,*) cvolume(iradius),cvolume(fradius),cvolume(dradius)

  stop
end program ans_11_01