module ord
public::ord1
contains
subroutine ord1(id,name,note)
real,dimension(:,:),intent(inout)::note
character(len=*),dimension(:),intent(inout)::name

integer, dimension (:),intent(inout)::id

real,dimension(100,8)::temp
character(len=75)::temp_2

real::temp_1
integer::i,j
do i=1,38
do j=i+1,39
if(note(j,8)<note(i,8))then
temp(1,1:8)=note(j,1:8)

note(j,1: 8)=note(i,1:8)
note(i,1:8)=temp(1,1:8)

temp_1=id(j)
id(j)=id(i)
id(i)=temp_1

temp_2=name(j)
name(j)=name(i)
name(i)=temp_2
endif

 
enddo

enddo
return
endsubroutine ord1
endmodule ord