Function Sign(x:real):integer;
begin
if x<0 then Sign:=-1<br> else if x=0 then Sign:=0
else Sign:=1;
end;
var a,b:real;
begin
writeln('a, b:');
readln(a,b);
writeln('Sign(A) + Sign(B) = ',Sign(a) + Sign(b));
end.
Пример:
a, b:
-8 0
Sign(A) + Sign(B) = -1