VB PROGRAM FOR TRANSPOSE OF MATRIX:
Dim a(), trans(), i, j, r, c As Integer
Dim a(), trans(), i, j, r, c As Integer
Private Sub Command1_Click()
r = InputBox("enter row")
c = InputBox("enter coloumns")
ReDim a(r, c)
ReDim trans(r, c)
Print "mat is"
For i = 1 To r
For j = 1 To c
a(i, j) = InputBox("enter")
Print a(i, j); " ";
Next
Print " "
Next
Print "transpose is"
For i = 1 To r
For j = 1 To c
trans(i, j) = a(j, i)
Print trans(i, j); " ";
Next
Print " "
Next
End Sub
End Sub
Output |
Thank you 😊
ReplyDeleteThanks for the code
ReplyDelete