СК
Сергей Карапетьянц
program func;
uses crt, graphABC;
var
x1, x2, y1, y2, h, w, xc, yc: integer;
begin
clrscr;
h:=500;
w:=900;
write('Введите Х1 = ');
readln(x1);
write('Введите Х2 = ');
readln(x2);
y1:=round(8.2*x1-3);
y2:=round(8.2*x2-3);
SetWindowHeight(h);
SetWindowWidth(w);
ClearWindow;
//---------Рисуем оси координат
SetPenColor(clRed);
SetPenWidth(1);
Line(0,round(h/2),w,round(h/2));
line(round(w/2),0,round(w/2),h);
//---------переводим в координаты с точкой (0,0) в центре экрана
SetPenColor(clBlack);
SetPenWidth(3);
xc:=round(w/2);
yc:=round(h/2);
Line((xc+x1),(yc-y1),(xc+x2),(yc-y2));
readkey;
end.