Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Rextester.Program.Main is the entry point for your code. Don't change it.
- 'Compiler version 11.0.50709.17929 for Microsoft (R) .NET Framework 4.5
- Imports System
- Imports System.Collections.Generic
- Imports System.Linq
- Imports System.Text.RegularExpressions
- Namespace Rextester
- Public Module Program
- Public Sub Main(args() As string)
- 'Your code goes here
- Console.WriteLine("Hello, world!")
- Dim matrix = New Integer(3, 2) {{1, 2, 3}, {2, 3, 4}, {3, 4, 5}, {4, 5, 6}}
- Dim newMatrix(2, 3) As Integer
- Dim i As Integer
- Dim j As Integer
- For i = matrix.GetLowerBound(0) To matrix.GetUpperBound(0)
- 'Console.WriteLine("row {0}", i)
- For j = matrix.GetLowerBound(1) To matrix.GetUpperBound(1)
- Console.Write(matrix.GetValue(i, j))
- newMatrix.SetValue(matrix.GetValue(i, j), j, i)
- Next j
- Console.WriteLine("")
- Next i
- Console.WriteLine("")
- For i = newMatrix.GetLowerBound(0) To newMatrix.GetUpperBound(0)
- 'Console.WriteLine("row {0}", i)
- For j = newMatrix.GetLowerBound(1) To newMatrix.GetUpperBound(1)
- Console.Write(newMatrix.GetValue(i, j))
- Next j
- Console.WriteLine("")
- Next i
- End Sub
- End Module
- End Namespace
Add Comment
Please, Sign In to add comment