Контрольная работа: Решение задач с помощью задания формул и создания макросов
Dim str As String
n = 3
m = 4
ReDim A(1 To n, 1 To m)
ReDim b(1 To m)
For i = 1 To n
For j = 1 To m
A(i, j) = Int((10 * Rnd) - 5)
Next j
Next i
str = " "
For i = 1 To n
For j = 1 To m
str = str + CStr(Format(A(i, j), "Fixed")) + " "
Next
Next
'Выведем результат
UserForm1. Label4 .Caption = str
For j = 1 To m
For i = 1 To n
Sum = Sum + A(i, j)
Next i
b(j) = Sum
Sum = 0
Next j
str = " "
For j = 1 To m
str = str + CStr(Format(b(j), "Fixed")) + " "
Next