#include <iostream> #include <ctime> using namespace std; const int MAX_S = 10; void create (int Arr[MAX_S][MAX_S], int collumn, int row) { for (int currentRow(0); currentRow < row; currentRow++) { for (int currentCol(0); currentCol < collumn; currentCol++) Arr[currentRow][currentCol] = rand()%100-50; } } void show(int Arr[MAX_S][MAX_S],int collumn,int row) { for (int currentRow(0); currentRow < row; currentRow++) { cout << "(" << currentRow << ")"; for (int currentCol(0); currentCol < collumn; currentCol++) cout << Arr[currentRow][currentCol] << "\t"; cout << endl; } } void swap(int Arr[MAX_S][MAX_S],int collumn,int row) { for (int currentRow(0); currentRow < collumn; currentRow++) { int mirroredCol = collumn - 1; for (int currentCol(0); currentCol < row/2; currentCol++) { if(currentCol % 2 != 0) { swap(Arr[currentRow][currentCol],Arr[currentRow][mirroredCol]); mirroredCol--; } } } } int main() { int row,collumn; cout << "Введіть кількість рядків:\n"; cin >> row; cout << "Введіть кількість стовпців:\n"; cin >> collumn; int Arr[MAX_S][MAX_S]; srand(time(NULL)); create(Arr,collumn,row); show(Arr,collumn,row); swap(Arr,collumn,row); cout << "\n\n\n"; show(Arr,collumn,row); return 0; } The swap function reverses the row, but it needs to be redone to turn the column. How to change the function to turn the column?