var
n, max, count, contrl, max2: integer;
begin
contrl := 0;
max := 0;
Writeln('Введите числа: ');
Readln(n);
while n <> 0 do
begin
Inc(count);
if n>max then begin max2:=max; max:=n end
else if n > max2 then max2 := n;
Read(n);
end;
max2*=max;
Writeln('Введите контрольное значение: ');
Read(contrl);
Writeln('Получено: ', count, ' чисел');
Writeln('Получено контрольное значение: ', contrl);
Writeln('Вычисленное контрольное значение:: ', max2);
if contrl = max then Writeln('Контроль пройден')
else Writeln('Контроль не пройден');
end.
var
n, max, count, contrl: integer;
begin
contrl := 0;
max := 0;
Writeln('Введите числа: ');
Readln(n);
while n <> 0 do
begin
Inc(count);
if (n mod 10 = 0) and (n > max) then max := n;
Read(n);
end;
Writeln('Введите контрольное значение: ');
Read(contrl);
Writeln('Получено: ', count, ' чисел');
Writeln('Получено контрольное значение: ', contrl);
Writeln('Вичисленное контрольное значение:: ', max);
if contrl = max then Writeln('Контроль пройден')
else Writeln('Контроль не пройден');
end.
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
int n;
cin >> n;
for(int i = 1; i <= n; i += 2)
{
cout << i << endl;
}
system("pause");
return 0;
}