* filling an array from a file and sorting it by bubble sort. * you need to create the input file to use this example program bubsrt integer temp, i, count, ar(10) count = 1 open (unit = 10, file = 'data.in', status = 'old') do 1 i = 1, 10 read (10, *) ar(i) 1 continue print*, ar 2 if (count.le.10) then do 3 i = 1, 9 if (ar(i).gt.ar(i+1)) then temp = ar(i) ar(i) = ar(i+1) ar(i+1) = temp end if 3 continue count = count + 1 go to 2 end if print*, ar end