Skip to main content

Write a VB Program to find transpose of given matrix.

· One min read
Kaustubh Kulkarni
file.vb
Private Sub cmdMatrix_Click()  
Dim a(1, 1) As Integer
For i = 0 To 1
For j = 0 To 1
a(i, j) = inputBox("Enter element" &ij)
Next
Next
Print "Given matrix is"

For i = 0 To 1
For j = 0 To 1
Print a(i, j);
Next
Print ""
Next
Print ""
Print "Transpose of Given matrix is"
For i = 0 To 1
For j = 0 To 1
Print a(j, i);
Next
Print ""
Next
End Sub