1.
Program A1;
const n=20;
var
i,a:integer;
O:array[1..n] of integer;
begin
a:=0;
for i:=1 to n do begin
readln(o[i]);
if o[i]<0 then a:=a+o[i];<br>end;
writeln(a);
end.
2.
Program A1;
const n=20;
var
i,a:integer;
O:array[1..n] of integer;
begin
a:=0;
for i:=1 to n do readln(o[i]);
a:=o[n];
for i:=n-1 downto 1 do o[i+1]:=o[i];
o[1]:=a;
for i:=1 to n do write(' ',o[i],' ');
end.
3.
Program A1;
const n=20;
var
i,a:integer;
O:array[1..n] of integer;
P:array[1..n] of integer;
M:array[1..n] of integer;
begin
for i:=1 to n do begin
readln(o[i]);
if o[i]>0 then p[i]:=o[i];
if o[i]<0 then m[i]:=o[i];<br>end;
for i:=1 to n do write(' ',o[i],' ');
writeln;
for i:=1 to n do
if p[i]<>0 then
write(' ',p[i],' ');
writeln;
for i:=1 to n do
if m[i]<>0 then
write(' ',m[i],' ');
writeln;
end.