построение графика функций y=tg(x) — Pascal(Паскаль)

uses Graph;
var Gd, Gm: Integer;
x, y: real;
begin
Gd := Detect;
InitGraph(Gd, Gm, ''); 
SetBkColor(1); 
line(50,0,50,480);
line(50,200,640,200);
moveto(50,200); 
x:=1;
repeat
y:=tg(x);
lineto(50+round(x*50),100+(100-round(y*20))) ; 
x:=x+0.02
until x>10;
Readln;
CloseGraph; 
end.

Leave a Comment

+ 14 = 18