uses graph;
var
gd, gm, i: integer;
procedure parabola(a, b, c: real);
var
x, y: real;
begin
for i := -10000 to 10000 do
begin
x := i / 50;
y := -((a * x * x) + (b * x) + c);
putpixel(round(x + 300), round(y) + 300, 3);
end;
end;
procedure giperbola(k: real);
var
x, y: real;
begin
for i := -10000 to 10000 do
if i <> 0 then
begin
x := i / 10;
y := -(k / (x / 100));
putpixel(round(x + 300), round(y) + 300, 2);
end;
end;
procedure sinusoida;
var
x, y: real;
begin
for i := -10000 to 10000 do
begin
x := i / 10;
y := -(sin(x / 100)) * 100;
putpixel(round(x) + 300, round(y) + 300, 4);
end;
end;
begin
gd := detect;
initgraph(gd, gm, ' ');
line(300, 0, 300, 1000);
line(0, 300, 1000, 300);
parabola(0.01, 0, 0);
giperbola(10);
parabola(-0.1, 10, 40);
sinusoida;
giperbola(-20);
readln;
closegraph;
end.