home *** CD-ROM | disk | FTP | other *** search
- (* procedure for drawing a circle *)
- procedure drawcircle(x1,y1,r: integer);
- var temp,x,z : integer;
- begin
- z := x1-r;
- for x := z to x1 do
- begin
- temp := y1-trunc(sqrt(r*r-(x1-x)*(x1-x)));
- gotoxy(x*2,temp); write('a');
- gotoxy(x*2,2*y1-temp); write('b');
- gotoxy((2*x1-x)*2,temp); write('c');
- gotoxy((2*x1-x)*2,2*y1-temp); write('d');
- end;
- end;
- begin
- clrscr;
- drawcircle(20,12,1);
- drawcircle(20,12,5);
- drawcircle(20,12,10);
- drawcircle(5,18,3);
- drawcircle(5,5,3);
- delay(3000);
- end.
-