Page 174 - 4192
P. 174

Програмний код:
                Sub Sum(X As Variant, k, m, S)
                S = 0
                For j = 1 To m
                S = S + X(k, j)
                Next i
                End Sub
                Private Sub Command1_Click()
                Const n = 5, m = 6
                Dim D(1 To n, 1 To m) As Integer
                Dim S, i, j As Integer
                For i = 1 To n
                For j = 1 To m
                D(i, j) = Val(InputBox("Введіть " + Str(i) + "," + Str(j) + "
           елемент масиву D", "D(5, 6)"))
                Picture1.Print D(i, j); " ";
                Next j
                Picture1.Print
                Next i
                For i = 1 To n
                Call Sum(D(), i, m, S)
                Picture2.Print i, S
                Next i
                End Sub
                Private Sub Command2_Click()
                End
                End Sub













                                             173
   169   170   171   172   173   174   175   176   177   178   179