INPUT k
DIM q(k)
FOR i = 1 TO k
INPUT "vvedite element ", q(i)
NEXT
max = q(1)
FOR i = 1 TO k
IF q(i) > max THEN max = q(i)
NEXT
PRINT "max="; max
FOR i = 1 TO k
IF q(i) > 0 THEN j = j + 1: f(j) = q(i) / max
NEXT
FOR i = 1 TO j
PRINT f(i); " ";
NEXT
Тестирование выполнено в программе QB64 ( Скачать )