Объяснение:
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
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
void main()
{
setlocale(0, "rus");
int mas[5][5];
srand(time(NULL));
cout << "Первоначальный массив" << endl;
for (int i = 0; i<5; i++){
cout << endl;
for (int j = 0; j<5; j++){
mas[i][j] = rand() % 10;
cout << mas[i][j] << " ";
}
cout << endl;
}
cout << "Полученный массив" << endl;
for (int i = 0; i<5; i++){
int tmp = mas[i][i];
mas[i][i] = mas[i][5 - i - 1];
mas[i][5 - i - 1] = tmp;
}
cout << endl;
for (int i = 0; i<5; i++){
cout << endl;
for (int j = 0; j<5; j++){
cout << mas[i][j] << " ";
}
cout << endl;
}
}
0
Объяснение:
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
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
void main()
{
setlocale(0, "rus");
int mas[5][5];
srand(time(NULL));
cout << "Первоначальный массив" << endl;
for (int i = 0; i<5; i++){
cout << endl;
for (int j = 0; j<5; j++){
mas[i][j] = rand() % 10;
cout << mas[i][j] << " ";
}
cout << endl;
}
cout << "Полученный массив" << endl;
for (int i = 0; i<5; i++){
int tmp = mas[i][i];
mas[i][i] = mas[i][5 - i - 1];
mas[i][5 - i - 1] = tmp;
}
cout << endl;
for (int i = 0; i<5; i++){
cout << endl;
for (int j = 0; j<5; j++){
cout << mas[i][j] << " ";
}
cout << endl;
}
}
0
22 байта или 176 бит
Объяснение:
Длина сообщения "Не делай из мухи слона" составляет 22 символа. Каждый символ кодируется 8 битами или 1 байтом, поэтому сообщение содержит 22 байта или 22*8 = 176 бит.