program funktsiooni_graafik; uses graph; function f(x: real): real; begin f:=x*x-300; end; var d, m, x, y, maxey, algey, miney: integer; maxy, miny, koefy, abiy: real; s: string; begin d:=detect; initgraph(d, m, ''); algey:=400; maxy:=f(50); maxey:=300; koefy:=maxey/maxy; miny:=f(0); miney:=algey-round(miny*koefy); str(miny:5:0, s); outtextxy(10, miney, s); outtextxy(10, miney-round((300-miny)*koefy), ' 300'); abiy:=1000; while(abiy<=maxy)do begin str(abiy:5:0, s); outtextxy(10, miney-round((abiy-miny)*koefy), s); abiy:=abiy+200; end; for x:=-50 to 50 do putpixel(x+200, algey-round(f(x)*koefy), white); readln; closegraph; end.