Page 149 - 4192
P. 149
Програмний код:
Private Sub Command1_Click()
Const n = 3, m = 4
Dim C(1 To n, 1 To m) As Integer
Dim S, i, j As Integer
For i = 1 To n
For j = 1 To m
C(i, j) = Val(InputBox("Введіть
C(3, 4)="))
Picture1.Print C(i, j); " ";
Next j
Picture1.Print
Next i
For i = 1 To n
S = 0
For j = 1 To m
S = S + C(i, j)
Next j
Picture2.Print i, " S= "; S
Next i
End Sub
Private Sub Command2_Click()
End
End Sub
Рисунок 9.10 – Схема
алгоритму розв’язку
задачі
148