100 rem 110 data "apple" 120 data "Melon" 130 data "Pineapple" 140 data "Orange" 150 data "Grapefruit" 160 data "Kiwi" 170 ' 180 dim x$(6)'sets up array 190 ' 200 for i = 1 to 6 'puts the data into array 210 read a$ 220 x$ (i) = a$ 230 next i 240 ' 250' 260 s=0 270 for i = 1 to 5 280 for j = i + 1 to 6 290 if x$ (i) < x$ (j) then 350 300 i$ = x$ (i) 310 x$(i) = x$(j) ' 320 x$(j) = t$ 330 s = 1 340 ' 350 next j 360 next i 370 ' 380 if s = 1 then 260 ' 390 ' 400 'print out the results: 410 for i = 1 to 6 420 print x$ (i) 430 next i 440 end