Program ex0911
Implicit none
character(len = 20), parameter :: output = 'List.bin'
integer, parameter :: players = 9, rec_length = 4
integer :: player
real :: hit_rate
open(10, file = output, form = 'unformatted' , access = 'direct' , & recl = rec_length)
do while (.true.)
write(*,*) 'Hit Number :'
read(*,*) player
if (player < 1 .or. player > players) exit
read(*,*) hit_rate
write(10, rec = player) hit_rate
end do
stop
end program ex0911