|
zadach45.BAS |
|
{* Задача45 *}REM basic ' Умножить матрицу B(M, N) на вектор V(N).CLS
DATA 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3
For i = 1 To 4
For j = 1 To 3 READ B(i, j)
PRINT B(i, j);
Next j: PRINT : Next i
PRINT
For i = 1 To 3 V(i) = i
Next i
M = 4: N = 3
For i = 1 To M
s = 0
For j = 1 To N s = s + B(i, j) * V(j)
Next j
Bv(i) = s
Next i
For i = 1 To M PRINT Bv(i);
Next i
End
|