|
zadach148.BAS |
|
{* Задача148 *}REM basic ' В квадратной матрице поменять местами 1-й и 2-й столбцы.CLS
Dim A(4, 4)
DATA 1, 2, 0.5, 3
DATA -1, 0.5, 2, -1.5
DATA 1.7, 0.3, 1, 2
DATA 2, -1, 0, 0.7
For iy = 1 To 4: For ix = 1 To 4
READ A(ix, iy)
PRINT A(ix, iy);
Next: PRINT : Next: PRINT
For iy = 1 To 4
SWAP A(1, iy), A(2, iy)
Next
For iy = 1 To 4: For ix = 1 To 4
PRINT A(ix, iy);
Next: PRINT : Next
End
|