№1:
Код
{$n+}
var
x, y, z: extended;
begin
readln(x);
if (x = 0) then
begin
writeln('division by zero expected'); halt(100)
end;
y:=sqr(x) - 1/x;
writeln('y':15, 'z':15);
while y<=sqr(x) + 2*x + 1/x - 0.2 do
begin
z:=ln(y) + exp(-y);
writeln(y:15:9, z:15:9);
y:=y + 0.01/(x*sqr(x));
end;
readln
end.
Юля-я! Не совсем ясны формулы, можно уточнить (скобок нигде нет?)
№2:
Код
const
n = 4; {rows}
m = 5; {cols}
var
b: array[1 .. n] of real;
const
mx: array[1 .. n, 1 .. m] of real =
((1, 2, 3, 4, 5),
(4, 2, 8, 4, 0),
(6, 2, 9, 3, 3),
(5, 3, 2, 6, 3));
procedure get_min_max(n: integer;
var min, max: real);
var i: integer;
begin
min := maxInt; max := -maxInt;
for i := 1 to m do
begin
if min > mx[n, i] then min := mx[n, i];
if max < mx[n, i] then max := mx[n, i];
end;
end;
var
row_min, row_max: real;
i: integer;
begin
writeln('array b:');
for i := 1 to n do
begin
get_min_max(i, row_min, row_max);
b[i] := row_max - row_min;
write(b[i]:8:3)
end;
writeln;
end.