CLS
INPUT "Vvedite n:"; n
max = -10 ^ 10: min = 10 ^ 10
DIM a(1 TO n), b(1 TO n), c(1 TO n), d(1 TO n)
REM "vvod massiva"
FOR i = 1 TO n
a(i) = INT(RND(i) * 100 - 50)
b(i) = INT(RND(i) * 100 - 50)
NEXT i
REM "obrabotka massiva"
FOR i = 1 TO n
IF a(i) < b(i) THEN c(i) = a(i) + b(i)
d(i) = b(i) + b(i)
IF a(i) > b(i) THEN c(i) = a(i) + a(i)
d(i) = b(i) + a(i)
IF d(i) >= max THEN max = d(i)
IF d(i) <= min THEN min = d(i)
PRINT "c(i)= "; c(i), "d(i)= "; d(i)
NEXT i
PRINT TAB(15); "Max= "; max, "Min= "; min
REM "Srednee Arifmeticheskoe"
FOR i = 1 TO n
s = s + c(i)
NEXT i
Sa = s / n
PRINT "SrArifm= "; Sa
END
Тестирование выполнено в программе QB64 ( Скачать )