View Single Post
  #1  
Old 10-12-2009, 11:15 PM
taha khan's Avatar
taha khan taha khan is offline
Toddler

 
Join Date: Oct 2007
Location: Mumtaaz Abad Multan
Age: 34
Posts: 22
Class Roll Number: 07-06
taha khan will become famous soon enough
Send a message via Yahoo to taha khan
Default Taking transpose of a matrix program code: implementation of 2 dimensional arrays


Taking Transpose of a Matrix

Code:
Module Mattranspose
 
 
 Sub Main()
 Dim i, j As Integer
 Dim Matrix1 As Integer(,) = New Integer(,) {{1, 2, 3}, {4, 5, 6}}
 For i = 0 To 1
 For j = 0 To 2
 
                Console.Write(Matrix1(i, j) & vbTab)
 Next
            Console.Write(vbCrLf)
 
 Next
 
        Console.Write("Transpose of the above matrix is given below:" & vbCrLf)
 For i = 0 To 2
 For j = 0 To 1
                Console.Write(Matrix1(j, i) & vbTab)
 Next
            Console.Write(vbCrLf)
 Next
 
 End Sub
 
 
 
 
End Module
 


Last edited by .BZU.; 10-12-2009 at 11:16 PM. Reason: code tag removed from heading...
Reply With Quote