Пуск ли, смотря какая кнопка
Ответ:
// ConsoleApplication1.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <vector>
using std::cout;
int main()
{
std::vector<int> ints = { 1 , -2, -3, -4, 5, 6, -7, -8, -9, 10 };
cout << "vector before transformation: ";
for (auto integer : ints) {
cout << integer << " ";
}
cout << std::endl;
for (std::size_t i = 1; i < ints.size(); ) {
if (ints[i] < 0) {
ints.erase(ints.begin() + i);
i += 1;
continue;
}
i += 2;
}
cout << "vector after transformation: ";
for (auto integer : ints) {
cout << integer << " ";
}
cout << std::endl;
}
Объяснение:
По условию создаем вектор, удаляем элементы из вектора, если число ниже 0, движемся через один элемент по вектору ¯\_(ツ)_/¯
Попробуйте оплатить задолженность и позвонить провайдеру.
<span />
5. 2) и 4)
6.a:=3 b:=6
a:=2*a - b
a:=2*3-6
a:=0
b:=a +22
b:=0+22
b:=22
7. если а>б то s:=a+22
иначе s:=b^2
5 не больше 7 значит s:=7^2
s:=49
8. Цикл тут. 1. 10 больше 2, значит a:=2+3=5 b:=10-1=9 c:=3+1=4
2. 9 больше 5 значит a:=5+4=9 b:=9-1=8 c:=4+1=5
3. 8 не больше 8 значит c:=c*b=5*8=40