BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan

BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan (http://bzupages.com/)
-   Visual Programming (http://bzupages.com/237-visual-programming/)
-   -   Copying One Matrix into the other program (http://bzupages.com/f237/copying-one-matrix-into-other-program-7019/)

taha khan 10-12-2009 11:12 PM

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



All times are GMT +5. The time now is 09:02 PM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.