Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
11
Task/Pick-random-element/Fortran/pick-random-element.f
Normal file
11
Task/Pick-random-element/Fortran/pick-random-element.f
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
program pick_random
|
||||
implicit none
|
||||
|
||||
integer :: i
|
||||
integer :: a(10) = (/ (i, i = 1, 10) /)
|
||||
real :: r
|
||||
|
||||
call random_seed
|
||||
call random_number(r)
|
||||
write(*,*) a(int(r*size(a)) + 1)
|
||||
end program
|
||||
Loading…
Add table
Add a link
Reference in a new issue