• Have Any Question?
  • contact@eitworld.com

Circle() Function





circle() function is used to draw the circle of a specified radius and center (X,Y) on the screen.

void circle(int x, int y, int radius);
  • circle() function contains three parameters X-coordinate, Y-coordinate and radius.
  • X and Y coordinates (X,Y) specifies the center of the circle.
  • Third parameter radius specifies the radius of the circle.

Program

#include<stdio.h>

#include<conio.h>

#include<graphics.h>

void main()

{

int gd=DETECT,gm;

initgraph(&gd,&gm,” “);

circle(320,240,100);

getch();

closegraph();

}

Above program is used to draw the circle of radius 100 cm at position(320,240) on the screen.

Output

circle



Real Time Web Analytics