9. Write a VB Program to find Multiplication of two matrices.


Private Sub cmdClear_Click()
Form1.Cls
End Sub

Private Sub cmdExit_Click()
Unload Me
End Sub

Private Sub cmdMult_Click()
Dim a(), b(), c() As Integer
Dim i, j, r1, c1, r2, c2, k As Integer
r1 = Val(InputBox(“Enter rows for First Array”))
c1 = Val(InputBox(“Enter columns for First Array”))
r2 = Val(InputBox(“Enter rows for Second Array”))
c2 = Val(InputBox(“Enter columns for Second Array”))
ReDim a(1 To r1, 1 To c1)
Print “First Array”
For i = 1 To r1
For j = 1 To c1
a(i, j) = Val(InputBox(“Enter Elements”))
Print a(i, j)
Next
Next

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s