Первая
const n=10;
var a:array[1..n] of integer;
i,t:integer;
begin
randomize;
for i:=1 to n do a[i]:=random(100);
for i:=1 to n do begin
writeln('a[',i,']=',a[i]);
if(t < a[i]) then
t:=a[i];
end;
writeln('Максимимум: ',t);
end.
Вторая
const n=5;
var a:array[1..n] of integer;
i,t,c:integer;
begin
for i:=1 to n do readln(a[i]);
for i:=1 to n do begin
if(t < a[i]) then begin
t:=a[i];
c:=0;
end;
if(t = a[i]) then
c += 1;
end;
writeln(c);
end.
Третья
const n=5;
var a:array[1..n] of integer;
i,t,c:integer;
begin
for i:=1 to n do readln(a[i]);
for i:=1 to n do begin
if(i mod 2 = 0) then
t:=t + a[i];
if(i mod 2 <> 0) then
c:=c + a[i];
end;
writeln(t-c);
end.
Дополнение
i:=1;
while i
i:=i+1;
end;
---------------------------------
for i:=1 to 20 do begin
end;