Fortraneries/BloubWorld/essai.f90
2024-01-31 11:11:50 +01:00

34 lines
709 B
Fortran

program essai
! use bloubspace
use mathstuff
implicit none
call test_random(10)
STOP ': BECAUSE JOB IS DONE'
! --------------------------------------------------------------
contains
subroutine test_random(nbre)
integer, intent(in) :: nbre
integer :: foo
real :: quux, bar
double precision :: somme
call init_random_seed() ! in module 'mathstuff'
somme = 0.0
do foo=1, nbre
quux = 10.0 * rand()
somme = somme + quux
bar = quux ** (.1/.3)
print *, quux, bar, somme/foo
enddo
end subroutine test_random
! --------------------------------------------------------------
end program