![]() |
Eugeniusz Jakubas |
Stąd można pobrać teksty źródłowe poniższych 57 programów w Pascalu pr-pascal.zip - 34 kB
2. Ciągi
Program Wykresy_ciagow; uses Graph; var karta,tryb,n,j:integer; y:real; function a(n:integer):real; begin a:=10/n; end; begin karta:=detect; initGraph(karta,tryb,''); j:=16; setColor(darkGray); for n:=10 to 640 div j do line(n*j+20,0,n*j+20,479); for n:=-240 div j to 240 div j do line(160,240+n*j,639,240+n*j); setcolor(white); line(160,240,639,240); line(630,235,639,240); line(630,245,639,240); outtextxy(630,250,'n'); line(180,0,180,479); line(175,9,180,0); line(180,0,185,9); outtextxy(190,8,'an'); n:=0; setColor(lightBlue); setFillStyle(1,lightBlue); repeat n:=n+1; y:=a(n); writeLn(y:1:11); if abs(y)<480 then fillEllipse(round(n*j+180),round(240-y*j),2,2); until n>28; readln; closeGraph; end. |
![]() |