Program fantscrin;
const n = 10;
Var a: array [1..n] of integer;
i,j,k:integer; s:real;
Begin
for i:=1 to n do
a[i]:=random(20)-10;
write(a[i], ' ');
for j:=1 to n-1 do
if (a[j]<a[j+1]) then
begin
k:=a[j];
a[j]:=a[j+1];
a[j+1]:=k;
end;
writeln('');
s:=0;
if ((a[i] < 0)and(i mod 2=0)) then s:=s+1;
writeln(s);
End.
Program fantscrin;
const n = 10;
Var a: array [1..n] of integer;
i,j,k:integer; s:real;
Begin
for i:=1 to n do
a[i]:=random(20)-10;
for i:=1 to n do
write(a[i], ' ');
for i:=1 to n do
for j:=1 to n-1 do
if (a[j]<a[j+1]) then
begin
k:=a[j];
a[j]:=a[j+1];
a[j+1]:=k;
end;
writeln('');
for i:=1 to n do
write(a[i], ' ');
s:=0;
for i:=1 to n do
if ((a[i] < 0)and(i mod 2=0)) then s:=s+1;
writeln('');
writeln(s);
End.
Program fantscrin;
const n = 10;
Var a: array [1..n] of integer;
i,j,k:integer; s:real;
Begin
for i:=1 to n do
a[i]:=random(20)-10;
for i:=1 to n do
write(a[i], ' ');
for i:=1 to n do
for j:=1 to n-1 do
if (a[j]<a[j+1]) then
begin
k:=a[j];
a[j]:=a[j+1];
a[j+1]:=k;
end;
writeln('');
for i:=1 to n do
write(a[i], ' ');
s:=0;
for i:=1 to n do
if ((a[i] < 0)and(i mod 2=0)) then s:=s+1;
writeln('');
writeln(s);
End.