Fortraneries/RandomStuff/essai.f90

22 lines
460 B
Fortran
Raw Normal View History

2022-05-23 12:23:21 +02:00
program essai
2022-10-28 21:53:57 +02:00
use mathstuff2
implicit none
integer :: foo, bar
real :: quux
double precision :: somme
write(0, *) "----------------- essai -------------------"
call init_random_seed() ! in module 'mathstuff'
somme = 0.0
do foo=1, 500
quux = rand() + rand()
somme = somme + quux
bar = mod(irand(), 7)
print *, foo, quux, somme/foo, bar
enddo
2022-05-23 12:23:21 +02:00
end program