1.
const
quantity = 18;
var
res, d: integer;
function sum(a, b: integer): integer;
begin
sum := a + b;
end;
begin
writeln('Введите число D: ');
readln(d);
res := sum(d, quantity);
writeln(res);
end.
2.
const
x = 1.0;
var
square, radius, Pi_num: real;
function ArcTan(X: Real): Real;
begin
ArcTan := (sin(x) / cos(x));
end;
function ray(square: real): real;
begin
ray := sqrt(square / Pi_num);
end;
begin
Pi_num := ArcTan(x) * 2;
writeln('Введите площадь окружности: ');
readln(square);
radius := ray(square);
writeln(radius);
end.
Uses Crt;
Var
c: array[1..1000] of integer;
n, i, null, otric, polozhit :integer;
Begin
writeln('Razmer massiva = '); Readln(n);
for i:=1 to n do begin
c[i]:=random(40) - 20;
write(c[i]:4);
end;
writeln();
otric:=0; polozhit:=0; null:=0;
for i:=1 to n do begin
if (c[i]<0) then otric:=otric+1;
if (c[i]>0) then polozhit:=polozhit+1;
if (c[i]=0) then null:=null+1;
end;
writeln('Kol-vo chisel < 0: ', otric);
writeln('Kol-vo chisel > 0: ', polozhit);
writeln('Kol-vo chisel = 0: ', null);
End.