2 Задание.
program untitled;
cons tN=7;
var i,k:integer;
m:array [1..N] of integer;
begin
k:=1000;
for i:=1 to N do
readln(m[i]);
for i:=1 to N do begin
if (m[i]>0)and(m[i] div 100>0)and(m[i] mod 3=0) then begin
if m[i] k:=m[i];
end;
end;
writeln(k);
end.
3 Задание.
program untitled;
const N=7;
var min,max,sum,i:integer;
m:array [1..N] of integer;
begin min:=100; max:=-100; for i:=1 to N do
readln(m[i]); for i:=1 to N do begin
if (m[i]>m[i+1]) and (m[i]>max) then
max:=m[i];
if (m[i] min:=m[i];
end;
sum:=min+max;
writeln(sum);
end.