Program n;
uses crt;
var i:integer;
begin
for i:=-10 to 10 do writeln(i:4, abs(i):4);
<span>end. </span>
var a,b,sum,c:real; begin write(); readln(a,b,c); begin sum:=b+a+c;
sum:=sum/3 end; writeln(sum); end.
const
N = 50;
var
a:array[1..N] of integer;
b:array[1..N] of real;
i:integer;
begin
randomize;
for i := 1 to N do
begin
a[i]:=100-random(201);
b[i]:=sqr(a[i])/(i+a[i]);
writeln('a[',i,']=',a[i],'; b[',i,']=',b[i]:5:3);
end;
end.
Const
n = 10;
var
i, c: integer;
a, w: array[1..n] of integer;
begin
randomize;
writeln('Исходный массив:');
for i := 1 to n do
begin
a[i] := random(201) - 100;
write(a[i], ' ');
end;
writeln;
c := 0;
for i := 1 to n do
if a[i] > 0 then
begin
c := c + 1;
w[c] := a[i];
end;
writeln('Кол-во положительных элементов: ', c);
for i := 1 to n do
begin
if a[i] <= 0 then
begin
c := c + 1;
w[c] := a[i];
end;
end;
writeln('Результат:');
for i := 1 to c do
write(w[i], ' ');
end.