CLS
n=5:m=5
DIM a(n,m)
RANDOMIZE TIMER
FOR i=1 TO n
FOR j=1 TO m
a(i,j)=INT(RND*101)-50
NEXT j
NEXT i
PRINT "Matrica"
FOR i=1 TO n
FOR j=1 TO m
PRINT a(i,j);
NEXT j
PRINT
NEXT i
FOR i=1 TO n
FOR j=1 TO m
IF a(i,i)<a(i,j) THEN PRINT "Matrica ne obladaet diagonalnim preobladaniem":END
NEXT j
NEXT i
PRINT "Matrica obladaet diagonalnim preobladaniem"
Тестирование выполнено в программе QB64 ( Скачать )