Паскаль АВС:
Program kislota;
uses crt;
const n=30;
var
e:array[1..n] of integer;
sum,nom,i: integer;
begin
writeln('*** alphaues is thinking... ***');
writeln('*** OK ***');
writeln();
writeln('Элементы массива:');
randomize;
nom:=0;
for i:=1 to n do
begin
e[i]:=random(100)-50;
write (e[i]:5);
end;
sum:=e[1]+e[2];
for i:=1 to n-1 do
if (e[i]+1 + e[i+1])>sum then
begin
sum:=e[i]+1 + e[i+1];
nom:=i;
end;
writeln();
writeln('Номер первого элемента пары с максимальной суммой: ',nom);
end.
var a:array[1..1000]of longint;
n,i,kol:longint;
begin
read(n);
for i:=1 to n do
read(a[i]);
for i:=1 to n-1 do
if a[i]<a[i+1] then kol:=kol+1;
if kol=n then write('vorast') else writeln('net');
end.
var a:array[1..1000]of longint;
n,i:longint;
begin
read(n);
for i:=1 to n do
read(a[i]);
for i:=1 to n do
if i mod 2 <>0 then write(a[i],' ');
end.