CLS
INPUT "vvedite n"; n
DIM a(n)
FOR i = 1 TO n
PRINT "vvedite element "; i
INPUT a(i)
IF a(i) MOD 5 = 0 THEN max = a(i): k = i
NEXT
FOR i = 1 TO n
IF a(i) MOD 5 = 0 AND a(i) > max THEN max = a(i): k = i
NEXT
PRINT "nomer"; k; "znazenie"; max
Тестирование выполнено в программе QB64 ( Скачать )