Var a:array[0..5] of longint; b,c,d,e,i:longint; begin b:=-maxlongint; for i:=1 to 5 do read(a[i]); for i:=1 to 5 do if a[i]*a[i-1]>b then b:=a[i]*a[i-1]; writeln(b); end.
Var ar:array[1..10] of integer; max,i:integer; begin; randomize; max:=-1; writeln('Array:'); for i:=1 to 10 do begin; ar[i]:=random(100); write(ar[i]:4); end; writeln; writeln('Combinations:'); for i:=2 to 10 do begin; write(ar[i]*ar[i-1]:6); if ar[i]*ar[i-1]>max then max:=ar[i]*ar[i-1]; end; writeln; writeln('Result:',max); end.
a:array[0..5] of longint;
b,c,d,e,i:longint;
begin
b:=-maxlongint;
for i:=1 to 5 do read(a[i]);
for i:=1 to 5 do if a[i]*a[i-1]>b then b:=a[i]*a[i-1];
writeln(b);
end.
max,i:integer;
begin;
randomize;
max:=-1;
writeln('Array:');
for i:=1 to 10 do
begin;
ar[i]:=random(100);
write(ar[i]:4);
end;
writeln;
writeln('Combinations:');
for i:=2 to 10 do
begin;
write(ar[i]*ar[i-1]:6);
if ar[i]*ar[i-1]>max then max:=ar[i]*ar[i-1];
end;
writeln;
writeln('Result:',max);
end.