The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled Pascal Code
Posted by: lolwut? | April 9, 2011 @ 4:28pm
Pascal Code
[
Download
]
uses CRT,Graph; type Point=record x:real; y:real; end; var input:text; D:array[-25..25] of Point; i:longint; a,b,c:real; temp1,temp2:integer; procedure InputData; begin assign(input,'INPUT.TXT'); reset(input); // ���� ����������� read(input,a,b,c); close(input); end; procedure DrawCoords; begin SetColor(White); // ���� OX line(80,180,320,180); line(320,180,310,170); line(320,180,310,190); // ���� OY line(200,60,200,300); line(200,60,210,70); line(200,60,190,70); end; procedure DrawGraph; begin SetColor(14); for i:=-23 to 24 do Line(trunc(D[i-1].x),trunc(D[i-1].y),trunc(D[i].x),trunc(D[i].y)); end; begin ClrScr; temp1:=detect; temp2:=1; InitGraph(temp1,temp2,'C:\FPC\2.4.2\bin'); InputData; for i:=-24 to 24 do begin D[i].x:=200+i*5; D[i].y:=180-(sqr(i)*a+i*b+c)*5; end; DrawCoords; DrawGraph; readln; end.
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.69 / 8
193 Votes