Даны матрицы K и H 4 ого порядка. 3 и 4 элементы 3е й строки матрицы К поменять местами, все элементы 2ого столбца матрицы H сделать равными 17- Basic(Бейсик)

DIM k(4,4),h(4,4)
RANDOMIZE TIMER
FOR i=1 TO 4 
FOR j=1 TO 4
k(i,j)=INT(RND*20)
h(i,j)=INT(RND*20)
NEXT
NEXT
PRINT "matrica k"
FOR i=1 TO 4 
FOR j=1 TO 4
PRINT k(i,j);" ";
NEXT
PRINT
NEXT
PRINT "matrica h"
FOR i=1 TO 4 
FOR j=1 TO 4
PRINT h(i,j);" ";
NEXT
PRINT
NEXT
SWAP k(3,3),k(3,4)
FOR i=1 TO 4
h(i,4)=17
NEXT
PRINT "novaya matrica k"
FOR i=1 TO 4 
FOR j=1 TO 4
PRINT k(i,j);" ";
NEXT
PRINT
NEXT
PRINT "novaya matrica h"
FOR i=1 TO 4 
FOR j=1 TO 4
PRINT h(i,j);" ";
NEXT
PRINT
NEXT

Leave a Comment