      module geometry
      real :: r, Area, Vol
c
c    r  - Radius of the sphere
c    Area - Surface area of the sphere
c    Vol - Volume of the sphere
      end module 
c
      module constants
      real, parameter :: Pi=3.141593
c
c     Pi -  3.14159265...
c
      end module constants
c
      program sphere
c
      implicit none
c
c   Calculate the surface area and volume of a sphere given its
c   radius
c
c   Programmed by: John Mahaffy  1/2/97
c
      call input
c
      call calcs
c
      call output
      stop
      end
c
      subroutine calcs
      use geometry
      use constants
      implicit none
c
c   Calculate the surface area and volume
c
c   Programmed by: John Mahaffy  1/2/97
c   Modified by:
c
c---------------------------------------------------------
	Area = 4.*Pi*r**2
        Vol = 4./3.*Pi*r**3
c---------------------------------------------------------
      return
      end
c
      subroutine input 
      use geometry
      implicit none
c
c   Prompt for and read the Radius
c
c   Programmed by: John Mahaffy  1/2/97
c
      write(*,2000,advance='no')
 2000 format(' Radius of the Sphere (meters): ')
      read *, r
      return
      end
c
      subroutine output
      use geometry
      implicit none
c
c   Print the Geometric Variables
c
c   Programmed by: John Mahaffy  1/2/97
c
      write  (*,2001) r, Area, Vol
 2001 format (' Radius of the Sphere = ' , f9.2,' meters',
     &  /,1p, 'Surface Area = ',e10.2, ' square meters',
     &  /, 'Volume = ',e10.2, ' cubic meters')
      return
      end
