результат распечатать в виде:
массив
сумма наибольших=
сумма наименьших =
DIM a(25)
RANDOMIZE TIMER
PRINT "massiv"
FOR i = 1 TO 25
a(i) = INT(RND * 50)
PRINT a(i);
NEXT
PRINT
FOR i = 1 TO 25
FOR j = 2 TO 25
IF a(j) < a(j - 1) THEN SWAP a(j), a(j - 1)
NEXT
NEXT
FOR i = 1 TO 4
smen = smen + a(i)
NEXT
FOR i = 22 TO 25
sbol = sbol + a(i)
NEXT
PRINT
PRINT "summa bolshih="; sbol, "summa menshih="; smen