Код программы;
#include <iostream>
#include <locale>
using namespace std;
int main(void) {
srand(time(NULL));
setlocale(LC_ALL, "Russian");
int *mas, N, max, i , j;
cout << "Введите N" << endl;
cin >> N;
if (N > 5 && N < 109) {
mas = new int[N];
cout << "Введите числа:" << endl;
for (i = 0; i < N; i++)
cin >> mas[i];
max = mas[0] + mas[5];
for (i = 0; i < N; i++) {
if (i + 5 >= N)
break;
for (j = i+5; j < N; j++) {
if (mas[i] + mas[j] > max)
max = mas[i] + mas[j];
}
}
cout << "\nМаксимальная сумма = "<< max << endl;
delete mas;
}
else
cout << "Ошибка. Заданное значение N не соответствует условию: 5 < N < 109" << endl;
return 0;
}
//c++
#include <iostream>
#include <cmath>
#include <ctime>
using namespace std;
signed main() {
srand(time(NULL));
setlocale(LC_ALL, "Rus");
int matrix[5][5];
long int pr = 1;
cout << "Сгенерированная матрица: " << endl;
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
matrix[i][j] = rand() % 15;
cout << matrix[i][j] << " ";
if (matrix[i][j] % 2 != 0)
pr *= matrix[i][j];
}
cout << endl;
}
cout << "\nПроизведение нечетных элементов: " << pr << endl;
return 0;
}
Каждая из отдельных последовательностей цифр - это буква. Получается, тут три слова - otan, rodina, homeland.