C++
<span>#include <iostream>
#include <algorithm>
#include <iterator>
#include <random>
#include <vector>
std::mt19937 gen {std::random_device()()};
std::uniform_int_distribution<int> uid(1, 10);
int main()
{
int N = 0;
std::cin >> N;
std::vector<unsigned> arr(N);
for (auto &i : arr) i = uid(gen);
std::reverse(std::begin(arr), std::end(arr));
std::copy(std::begin(arr), std::end(arr),
std::ostream_iterator<int>(std::cout, " "));
system("pause");
<span>}</span></span>
Решение программы в приложении.
3, т.к. разница между 1 и 2 - 6, между 2 и 3 - 4, между 3 и 4 - 2.
3-0=3
1.
z = 1 + 128/5 = 1 + 64 = 65.
i = 1.
x = 64.
2.
z = 65 + 64/2 = 65 + 32 = 97.
i = 2.
x = 32.
3.
z = 97 + 32/2 = 97 + 16 = 115.
i = 3.
x = 16.
4.
z = 115 + 16/2 = 115 + 8 = 123.
i = 4.
x = 4.
Вывод: 123.
Ответ: 123.
var
x,y:real;
begin
Write('Введите х и у через пробел- '); Read(x,y);
Writeln(1+y/x)
end.
<u>Пример</u>Введите х и у через пробел- 13.54 -8.3
0.387001477104874