Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program lab1;
- var
- a, b, h, x, y : extended;
- begin
- write('Введите начальное значение аргумента: ');
- readln(a);
- write('Введите конечное значение аргумента: ');
- readln(b);
- write('Введите шаг прирощения аргумента: ');
- readln(h);
- if h <= 0 then
- begin
- writeln('error шаг прирожения должен быть положителььным. Нажмите enter для завершения...');
- readln;
- halt;
- end;
- x := a;
- repeat
- if (x <= 0) or (abs(x - 5) < 0.0000001) then writeln('x = ', x:0:5, ' y = undefined')
- else if x > 0 then
- begin
- if x < 5 then
- if (exp(ln(x) / 7) - exp(ln(2 / (5 - x)) / 3) > 0)
- and (abs(ln(exp(ln(x) / 7) - exp(ln(2 / (5 - x)) / 3))) > 0.0000001) then
- begin
- y := ((x + 5) / x - exp(x / 3)) / ln(exp(ln(x) / 7) - exp(ln(2 / (5 - x)) / 3));
- writeln('x = ', x:0:5, ' y = ', y:0:5);
- end
- else writeln('x = ', x:0:5, ' y = undefined')
- else if (exp(ln(x) / 7) + exp(ln(2 / (x - 5)) / 3) > 0)
- and (abs(ln(exp(ln(x) / 7) + exp(ln(2 / (x - 5)) / 3))) > 0.0000001) then
- begin
- y := ((x + 5) / x - exp(x / 3)) / ln(exp(ln(x) / 7) + exp(ln(2 / (x - 5)) / 3));
- writeln('x = ', x:0:5, ' y = ', y:0:5);
- end
- else writeln('x = ', x:0:5, ' y = udefined');
- end;
- x := x + h;
- until (x >= b) or (abs(x - b) < 0.0000001);
- x := b;
- if (x <= 0) or (abs(x - 5) < 0.0000001) then writeln('x = ', x:0:5, ' y = undefined')
- else if x > 0 then
- begin
- if x < 5 then
- if (exp(ln(x) / 7) - exp(ln(2 / (5 - x)) / 3) > 0)
- and (abs(ln(exp(ln(x) / 7) - exp(ln(2 / (5 - x)) / 3))) > 0.0000001) then
- begin
- y := ((x + 5) / x - exp(x / 3)) / ln(exp(ln(x) / 7) - exp(ln(2 / (5 - x)) / 3));
- writeln('x = ', x:0:5, ' y = ', y:0:5);
- end
- else writeln('x = ', x:0:5, ' y = undefined')
- else if (exp(ln(x) / 7) + exp(ln(2 / (x - 5)) / 3) > 0)
- and (abs(ln(exp(ln(x) / 7) + exp(ln(2 / (x - 5)) / 3))) > 0.0000001) then
- begin
- y := ((x + 5) / x - exp(x / 3)) / ln(exp(ln(x) / 7) + exp(ln(2 / (x - 5)) / 3));
- writeln('x = ', x:0:5, ' y = ', y:0:5);
- end
- else writeln('x = ', x:0:5, ' y = undefined');
- end;
- writeln('Нажмите enter для завершения...');
- readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement