CLS
max = -9999
DO
INPUT n
IF n = 0 THEN EXIT DO
IF n < 0 THEN
IF n > max THEN max = n
END IF
LOOP
PRINT max
CLS
max = -9999
DO
INPUT n
IF n = 0 THEN EXIT DO
IF n < 0 THEN
IF n > max THEN max = n
END IF
LOOP
PRINT max