include iostream include cmath include conio using namespace std int 1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include <cmath>
#include <conio.h>
using namespace std;
int a[10000][10000];
int main(){
int n, m, k;
bool check1 = false, check2 = false;
printf("Vvedite razmer massiva\n");
scanf("%d%d", &n, &m);
printf ("Vvedite elementi massiva\n");
for (int q=0; q<n; q++)
for (int w=0; w<m; w++)
scanf("%d", &a[q][w]);
for (int q=0; q<n/2; q++)
for (int w=0; w<m; w++){
k = a[q][w];
a[q][w] = a[n-q-1][w];
a[n-q-1][w] = k;
}
for (int q=0; q<n; q++){
for (int w=0; w<m; w++)
printf("%d ", a[q][w]);
printf("\n");
}
}