You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
671 B
31 lines
671 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
const int N = 110;
|
|
int a[N][N];
|
|
int t[N][N];
|
|
int K;
|
|
int n = 5;
|
|
int main() {
|
|
for (int i = 1; i <= n; i++)
|
|
for (int j = 1; j <= n; j++)
|
|
a[i][j] = ++k;
|
|
|
|
for (int i = 1; i <= n; i++) {
|
|
for (int j = 1; j <= n; j++)
|
|
printf("%02d ", a[i][j]);
|
|
printf("\n");
|
|
}
|
|
|
|
printf("\n");
|
|
for (int i = 1; i <= n; i++)
|
|
for (int j = 1; j <= n; j++)
|
|
t[n - j + 1][i] = a[i][j];
|
|
|
|
for (int i = 1; i <= n; i++) {
|
|
for (int j = 1; j <= n; j++)
|
|
printf("%02d ", t[i][j]);
|
|
printf("\n");
|
|
}
|
|
return 0;
|
|
} |