Program ex0909
implicit none
character(len = 20), parameter :: input = 'List'
integer, parameter :: players = 9
integer :: player
integer, parameter :: rec_length = 6
real :: hit_rate
open(10, file = input, form = 'formatted' , access
= 'direct' , & recl = rec_length)
do while (.true.)
write(*,*) 'Number:'
read(*,*) player
if(player < 1 .or. player > players) exit
read(10, fmt = '(F4.2)' , rec = player) hit_rate
write(*, 100) 'Number ' , player, 'hit_rate = ' ,
hit_rate
100 format(1X, A8, I2, A10, F5.2)
end do
stop
end program ex0909