// PascalABC.NET 3.6
begin
var x := ReadReal('x =');
var Y := x ** 3 - (x * x - x + 3) / Sqrt(x);
Print(Y)
end.
Программа:
program functions;
var c:real;
function x(a: real; n: real):real;
a:= power(a, n);
x:= a;
end;
function frac(a: real; b:real):real;
var c: real;
c:= a/b;
frac:= c;
function m_sqrt(n: integer):real;
m_sqrt:= 1/n;
write(
'Введите число: '
);
readln(c);
writeln(
'Значение функции Y(',c,'): ',
x(c,3)-
frac(
x(c,2)-c+3,
x(c,m_sqrt(2))
)
:0:3);
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
// PascalABC.NET 3.6
begin
var x := ReadReal('x =');
var Y := x ** 3 - (x * x - x + 3) / Sqrt(x);
Print(Y)
end.
Программа:
program functions;
var c:real;
function x(a: real; n: real):real;
begin
a:= power(a, n);
x:= a;
end;
function frac(a: real; b:real):real;
var c: real;
begin
c:= a/b;
frac:= c;
end;
function m_sqrt(n: integer):real;
begin
m_sqrt:= 1/n;
end;
begin
write(
'Введите число: '
);
readln(c);
writeln(
'Значение функции Y(',c,'): ',
x(c,3)-
frac(
x(c,2)-c+3,
x(c,m_sqrt(2))
)
:0:3);
end.