Ответ:
// 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, движемся через один элемент по вектору ¯\_(ツ)_/¯
Var r,v:real;
begin
write('Рост? '); readln(r);
write('Вес? '); readln(v);
if (r >= 168)and(r <= 178)and(v < r-115) then writeln('Принят')
else writeln('Не принят');
readln
<span>end.</span>
Выделение и deleted вроде
Var A,Min,N:integer;
Begin
Min:=30001;
Read(N);
For N:= 1 to N do
Begin
Read(A);
if (A mod 7 = 0)and(A < Min) then Min:=A;
End;
Write(Min)
End.