View Single Post
  #1  
Old 10-12-2009, 11:12 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 Copying One Matrix into the other program

Copying One Matrix into the other
Code:

Module Matcopy


 Sub Main()
 Dim i, j As Integer
 Dim Matrix1 As Integer(,) = New Integer(,) {{1, 2, 3}, {4, 5, 6}}
 Dim Matrix2 As Integer(,) = New Integer(2, 3) {}
 For i = 0 To 1
 For j = 0 To 2

               Console.Write(Matrix1(i, j) & vbCrLf)
 Next
 Next
 For i = 0 To 1
 For j = 0 To 2
               Matrix2(i, j) = Matrix1(i, j)
 Next
 Next
       Console.WriteLine("The copied Matrix is as follows ")
 For i = 0 To 1
 For j = 0 To 2
               Console.Write(Matrix2(i, j) & vbCrLf)
 Next
 Next
 End Sub



End Module


Last edited by taha khan; 10-12-2009 at 11:41 PM.
Reply With Quote