for(int i = 0; i < M/2; i++)
for(int j = 0; j < N/2; j++)
{
var temp = array[i,j];
array[i,j] = array[M/2 + i,N/2 + j];
array[M/2 + i,N/2 + j] = temp;
}
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
for(int i = 0; i < M/2; i++)
for(int j = 0; j < N/2; j++)
{
var temp = array[i,j];
array[i,j] = array[M/2 + i,N/2 + j];
array[M/2 + i,N/2 + j] = temp;
}