CLS
INPUT "vvedite n"; n
DIM a(n)
FOR i = 1 TO n
PRINT "vvedite element"; i
INPUT a(i)
NEXT
max = -1E38
FOR i = 1 TO n
IF a(i) < 0 AND a(i) > max THEN max = a(i): k = k + 1
NEXT
FOR i = 1 TO n
PRINT a(i);
NEXT
PRINT
IF k > 0 THEN PRINT "max(-)="; max ELSE PRINT "net otrichatelnyj elementov"
Тестирование выполнено в программе QB64 ( Скачать )