//Как давно я не писал program
//Pascal ABC.NET v3.1 сборка 1219
program boshe10iz10;
Var
xa,ya,xb,yb:real;
function qua(x,y:real):byte;
begin
if (x>0) and (y>0) then qua:=1;
if (x<0) and (y>0) then qua:=2;
if (x<0) and (y<0) then qua:=3;<br> if (x>0) and (y<0) then qua:=4;<br> end;
function dist(x,y:real):real;
begin
dist:=sqrt(sqr(x)+sqr(y));
end;
begin
read(xa,ya,xb,yb);
writeln('Point A in ',qua(xa,ya),' quarter');
writeln('Point B in ',qua(xb,yb),' quarter');
writeln('The distance from the origin to the point A=',dist(xa,ya));
end.
Пример ввода:
2.75
-7.25
3
4
Пример вывода:
Point A in 4 quarter
Point B in 1 quarter
The distance from the origin to the point A=7.75403120963541