1)
var a: array [1..9] of integer;
begin
for var i := 1 to 9 do
begin
write('Введите ', i, ' элемент: ');
readln(a[i]);
end;
var sum := 0;
for var i := 1 to 9 do
if a[i] > 45 then
sum += a[i];
writeln('Сумма: ', sum);
end.
2)
var a: array [1..9] of integer;
begin
for var i := 1 to 9 do
begin
write('Введите ', i, ' элемент: ');
readln(a[i]);
end;
var sum := 0;
for var i := 1 to 9 do
sum += a[i];
writeln('Сумма: ', sum);
end.
3)
var a: array [1..9] of integer;
begin
for var i := 1 to 9 do
begin
a[i] := random(-10, 10);
write(a[i], ' ');
end;
writeln();
var min := a[1];
for var i := 2 to 9 do
if (a[i] mod 2 <> 0) and (a[i] < min) then
min := a[i];
writeln('Min: ', min);
end.