need help) not necessarily code, enough clues, I will be grateful)
there is a matrix:
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 need to swap:
4 3 2 1 1 2 3 4 4 3 2 1 1 2 3 4 code:
var array = new int[4, 4]; for (int i = 0; i < array.GetLength(0); i++) { for (int j = 0; j < array.GetLength(1); j++) { array[j, i] = i + 1; // array[j, i] = j+1; } } for (int i = 0; i < array.GetLength(0); i++) { for (int j = 0; j < array.GetLength(1); j++) { Console.Write(array[i, j].ToString(" #0")); } Console.WriteLine(); }