D
D
DivineDraft2017-11-02 02:51:46
Pascal
DivineDraft, 2017-11-02 02:51:46

How to get real numbers?

Error: Program1.pas(15) : Cannot convert type function(a: real;b: real): real to real
Conditions of assignment: Real numbers x, y are given. Get h (x, y) + h2 (xy), xy), h4 (xy, x+y) + h (1, 1), where h:=(a/1+sqr(a))+(b/ 1+sqr(a))-((ab)*sqr(ab));

function h (a,b:real):real;
begin
h:=(a/1+sqr(a))+(b/1+sqr(a))-((a-b)*sqr(a-b));
end;

var x,y,k:real;

begin
read(x,y);
write(h(x,y)+ sqr(h) *(x-y), x*y);
end.

What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2017-11-02
@DivineDraft

function h (a,b:real):real;
begin
result:=(a/1+sqr(a))+(b/1+sqr(a))-((a-b)*sqr(a-b));
end;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question