CLS
DIM a(20), b(20)
PRINT "vvedite elementy 1 massia"
FOR i = 1 TO 20
INPUT a(i)
NEXT
PRINT "vvedite elementy 2 massia"
FOR i = 1 TO 20
INPUT b(i)
NEXT
INPUT "vvedite chislo n=", n
PRINT "ishodnyj massiv 1"
FOR i = 1 TO 20
PRINT a(i); " ";
NEXT
PRINT
PRINT "ishodnyj massiv 2"
FOR i = 1 TO 20
PRINT b(i); " ";
NEXT
FOR i = 1 TO 20
IF a(i) > b(i) THEN a(i) = a(i) + n: b(i) = b(i) + n
NEXT
PRINT
PRINT "novyj massiv 1"
FOR i = 1 TO 20
PRINT a(i); " ";
NEXT
PRINT
PRINT "novyj massiv 2"
FOR i = 1 TO 20
PRINT b(i); " ";
NEXT
n1 = 1
max1 = a(1)
n2 = 1
max2 = b(1)
FOR i = 1 TO 20
IF a(i) > max1 THEN max1 = a(i): n1 = i
IF b(i) > max2 THEN max2 = b(i): n2 = i
IF a(i) > 0 THEN s1 = s1 + a(i) ELSE IF a(i) < 0 THEN k1 = k1 + 1
IF b(i) > 0 THEN s2 = s2 + b(i) ELSE IF b(i) < 0 THEN k2 = k2 + 1
NEXT
PRINT
PRINT "summa polojitelnyh 1 massiva="; s1
PRINT "summa polojitelnyh 2 massiva="; s2
PRINT "kol-vo otricatelnyh 1 massiva="; k1
PRINT "kol-vo otricatelnyh 1 massiva="; k2
PRINT "nomer max element 1 massiva="; n1
PRINT "nomer max element 2 massiva="; n2
Тестирование выполнено в программе QB64 ( Скачать )