#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{int m;int arr[10];
cout << "input elements " << endl;
for ( int i= 0; i < 10; i++ )
cin >> arr[i];
cout << "input m " << endl;
cin >> m;
cout << "arr = {";
for ( int j = 0;j < 10; j++ )
cout << arr[j] << " ";
int sum;
for ( int k = 0; k < 10; k++ )
if (arr[k]*arr[k+1]<=m) {
sum=arr[k]+arr[k+1];break;
}
cout << "" << endl;
cout << "Summa " << " ";
cout << sum << endl;;
system("pause");
return 0;}
var
n, i, x, s : integer;
t : boolean;
begin
writeln('количество чисел');
readln(n);
s := 1;
t := false;
for i := 1 to n do
begin
writeln(i,' число');
readln(x);
if x < 7 then
begin
t := true;
s := s*x;
end;
end;
if t then
writeln('ответ ',s)
else
writeln('ответ ',0);
end.
Вторая
var
n, i, x, s : integer;
begin
writeln('kolichestvo chisel');
readln(n);
s := 0;
for i := 1 to n do
begin
writeln(i,' chislo');
readln(x);
if (x >= 10) and (x < 99) then
s := s + 1;
end;
writeln('Otvet: ',s);
end.
Третья
var
n, i, x, s : integer;
begin
writeln('kolichestvo chisel');
readln(n);
s := 0;
for i := 1 to n do
begin
writeln(i,' chislo');
readln(x);
if x > 10 then
s := s + 1
else if x < 10 then
s := s - 1;
end;
if s > 0 then
writeln('chisel >10 bolche')
else if s < 0 then
writeln('chisel <10 bolche')
else writeln('chisel porovnu');
end.
Четвёртая
var
n, i, x : integer;
st : string;
begin
writeln('kolichestvo chisel');
readln(n);
for i := 1 to n do
begin
writeln(i,' chislo');
readln(x);
if (x > 12) and (x < 40) and (x mod 7 = 0) then
st := st + IntToStr(x) + ' ';
end;
writeln('otvet: ',st);
end.