MODULE const INTEGER, PARAMETER :: dp = KIND(1.0d0), sp = KIND(1.0e0) REAL(KIND=dp), PARAMETER :: dpi = 3.141592653589793d0 END MODULE const !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! PROGRAM prog USE const IMPLICIT NONE ! Program for HW8, Problem 5 REAL(kind=dp) :: H,r1,r2,h2,V WRITE(*,*) 'Input H' READ(*,*) H WRITE(*,*) 'Input r1' READ(*,*) r1 WRITE(*,*) 'Input r2' READ(*,*) r2 h2 = H*r2/r1 V = dpi*H*(r1**2-r2**3/r1)/3 WRITE(*,*) 'Volume = ',V END PROGRAM prog !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Input H ! 3.2d0 ! Input r1 ! 1.1d0 ! Input r2 ! 0.5d0 ! Volume = 3.6739498087071918