Answer the question
In order to leave comments, you need to log in
How to multiply odd array row (first) by third?
Hi all.
I have an array of 3 columns 4 rows.
How to multiply the 1st row by the 3rd?
Private Sub CommandButton1_Click()
Dim A() As Single
Dim n As Single
Dim m As Single
Dim i As Single
Dim j As Single
n = InputBox("×èñëî ñòðîê")
m = InputBox("×èñëî ñòîëáöîâ")
ReDim A(n, m)
For i = 1 To n
For j = 1 To m
A(i, j) = InputBox("Ââåäèòå ýëåìåíò ìàòðèöû")
Label1.Caption = Label1.Caption & A(i, j) & vbTab
Next j
Label1.Caption = Label1.Caption & vbNewLine
Next i
For i = 1 To n Step 2
For j = 1 To m
A(i, j) = A(i, j) * A(i, j)
Label1.Caption = Label1.Caption & A(1, i) & vbTab
Next j
Next i
End Sub
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question