DIM a(20), b(20), c(20)
RANDOMIZE TIMER
FOR i = 1 TO 20
a(i) = INT(RND * 50)
b(i) = INT(RND * 50)
c(i) = INT(RND * 50)
NEXT
PRINT "massiv a"
FOR i = 1 TO 20
PRINT a(i);
NEXT
PRINT "massiv b"
FOR i = 1 TO 20
PRINT b(i);
NEXT
PRINT "massiv c"
FOR i = 1 TO 20
PRINT c(i);
NEXT
PRINT
maxa = a(1)
maxb = b(1)
maxc = c(1)
FOR i = 1 TO 20
IF a(i) > maxa THEN maxa = a(i): noma = i
IF b(i) > maxb THEN maxb = b(i): nomb = i
IF c(i) > maxc THEN maxc = c(i): nomc = i
NEXT
PRINT "maximalnyj element ranshe vstretitsya"
IF noma < nomb AND noma < nomc THEN PRINT "v massive a"
IF nomb < noma AND nomb < nomc THEN PRINT "v massive b"
IF nomc < noma AND nomc < nomb THEN PRINT "v massive c"