Think of your matrix like this:
it does not look like this in memrory
1 2 3
4 5 6
7 8 9
it looks like: 1 2 3 4 5 6 7 8 9 (spaces added for clarity)
So, load the array, print the first number then add 3 to the address print number, add 3 to the address and print number, print next 2 numbers, subtract 3 and print number, subtract 3 again and print number, sub 1 print number, sub 1 and print final number...
Your explanation was very useful for me. You help me to solve my problem. the input is 1,2,3,4,5,6,7,8,9 and the output is 1, 4, 7, 8, 9, 6, 3, 2, 5, 1. It wasn't difficult after your explanation.
I see you are good programmer, so I have just one more question for, if you can help me.
My task was to print the result. If the question was to make another matrix2 and load in the memory not to print. How can this realise it???
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...