CLS
INPUT "Kol-vo elementov v N:", el
IF el < 0 AND el > 350 THEN PRINT "elementy otsutstvujut": END
DIM N(el), M(el), nm
' Zapolnim massiv
RANDOMIZE TIMER
FOR i = 1 TO el: N(i) = INT(RND * 51) - 25: NEXT
' Vivedem elementi N
FOR i = 1 TO el: PRINT N(i);: NEXT: PRINT
' Perepishem kratnie elementi
FOR i = 1 TO el
IF N(i) MOD 5 = 0 THEN nm = nm + 1: M(nm) = N(i)
NEXT
' Vivedem elementi M
PRINT "Kratnye elementy:"
FOR i = 1 TO nm: PRINT M(i);: NEXT
Тестирование выполнено в программе QB64 ( Скачать )