Только программы (без примеров): А) CLS DIM a(1 TO 10) AS INTEGER PRINT "Введите 10 чисел" FOR i = 1 TO 10 INPUT a(i) NEXT i max = a(1) FOR i = 2 TO 10 IF a(i) > max THEN max = a(i) NEXT i PRINT "max = ";max END
Б) CLS INPUT "Введите количество элементов массива"; n DIM a(n) FOR i = 1 TO n INPUT "Введите значение элемента: "; a(i) NEXT i max = a(1) FOR i = 2 TO n IF a(i) > max THEN max = a(i) NEXT i PRINT "max = ";max END
А)
CLS
DIM a(1 TO 10) AS INTEGER
PRINT "Введите 10 чисел"
FOR i = 1 TO 10
INPUT a(i)
NEXT i
max = a(1)
FOR i = 2 TO 10
IF a(i) > max THEN max = a(i)
NEXT i
PRINT "max = ";max
END
Б)
CLS
INPUT "Введите количество элементов массива"; n
DIM a(n)
FOR i = 1 TO n
INPUT "Введите значение элемента: "; a(i)
NEXT i
max = a(1)
FOR i = 2 TO n
IF a(i) > max THEN max = a(i)
NEXT i
PRINT "max = ";max
END