!////////////////////////////////////////////////////////
!//
!// stat_use.f90
!//
!// Program to use the module statistics to calculate
!// the man value and the standard deviation of an array
!// of real values
!//
!////////////////////////////////////////////////////////


PROGRAM stat_use
  !// Usee the moduel statistics
  USE statistics
  !// Prevent implcit declarations of variables
  IMPLICIT NONE
  !// Allocate memory space for the array, in this case
  !// 10 elements
  ALLOCATE(array(10))
  !// Give the array some values
  array = (/1.,2.,3.,4.,5.,6.,7.,8.,9.,10./)
  !// Call the mean subroutine from the statistics
  !// module
  CALL mean()
    !// Call the stddev subroutine from the statistics
  !// module
  CALL stddev()
  !// Print the mean value of the array
  PRINT *, mval
  !// Print the standard deviation of the array
  PRINT *, sdev

END PROGRAM stat_use