home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / TURBO9.ZIP / DRAWCIRC.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1983-01-08  |  404 b   |  16 lines

  1. (* procedure for drawing a circle *)
  2. procedure drawcircle(x1,y1,r: integer);
  3.    var temp,x,z : integer;
  4.    begin
  5.    z := x1-r;
  6.    for x := z to x1 do
  7.    begin
  8.      temp := y1-trunc(sqrt(r*r-(x1-x)*(x1-x)));
  9.      gotoxy(x*2,temp); write('a');
  10.      gotoxy(x*2,2*y1-temp); write('b');
  11.      gotoxy((2*x1-x)*2,temp); write('c');
  12.      gotoxy((2*x1-x)*2,2*y1-temp); write('d');
  13.    end;
  14.    end;
  15.  
  16.