привет.. нет появился вот решение:
C++ |
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
| #include <iostream>
#include <cstdlib>
#include <fstream>
#include <ctime>
using namespace std;
int main()
{srand(time(0));
ofstream fout1("text.txt");
ifstream fin("text.txt");
ofstream fout2("text1.txt");
const int n = 3;
const int size = 2*n+1;
int a[size][size];
for(int i=0;i<size;++i)
{
for(int j=0;j<size;++j)
{
fout1 << rand()%10 << ' '; //Г§Г*ГЇГЁГ±Гј Гў ГґГ*éë text.txt ñëó÷Г*Г©Г*ûõ Г·ГЁГ±ГҐГ«
}
fout1 << endl;
}
for(int i=0;i<size;++i)
for(int j=0;j<size;++j)
fin >> a[i][j]; //ñ÷èòûâГ*Г*ГЁГҐ Г·ГЁГ±ГҐГ« Г± ГґГ*éëГ* text.txt Гў Г¬Г*Г±Г±ГЁГў
for(int i=size-1;i>=0;--i) //Г§Г*ГЇГЁГ±Гј Гў ГґГ*éë text1.txt Гў çåðêГ*ëüГ*îì îòðГ*æåГ*ГЁГЁ
{
for(int j=0;j<size;++j)
{
fout2 << a[i][j] << ' ';
}
fout2 << endl;
}
fout1.close();
fout2.close();
fin.close();
return 0;
} |
|
как то так