|
zadach43.BAS |
|
{* Задача43 *}REM basic ' Удалить столбец под номером colDel из матрицы B(M, N)CLS
PRINT "Исходная матрица"
M = 3: N = 4
Dim B(M, N)
DATA 1,0,4,5,2,0,7,6,9,1,0,7
For i = 1 To M: For j = 1 To N READ B(i, j): PRINT B(i, j);
Next j: PRINT : Next i: PRINT
colDel = 2
For i = 1 To M For j = colDel + 1 To N B(i, j - 1) = B(i, j)
Next j, i
PRINT "Новая матрица"
For i = 1 To M: For j = 1 To N - 1 PRINT B(i, j);
Next j: PRINT : Next i
End
|