|
zadach161.BAS |
|
{* Задача161 *}REM basic ' Создать массив, состоящий из произведения элементов матрицы по столбцамCLS
m = 10
n = 10
INPUT "Vvedite kol-vo stolbcov:"; m
INPUT "Vvedite kol-vo strok:"; n
Dim A(m, n) As Long, B(m) As Long
RANDOMIZE TIMER
For iy = 1 To n: For ix = 1 To m
A(ix, iy) = RND * 10: PRINT A(ix, iy);
Next: PRINT : Next: PRINT
For ix = 1 To n
B(ix) = 1
For iy = 1 To m
B(ix) = B(ix) * A(ix, iy)
Next
Next
For i = 1 To m
PRINT B(i);
Next
End
|