Circle in C/C++ graphics


Circle in C/C++ graphics

C graphics has circle() function which is use to draw the circle.

circle() :

This function is used to draw the circle in c graphics.

Syntax :

circle(int x,int y,radius);

Argument :

(x,y)---Centre point of circle.

radius--radius of the circle.

Example :


#include <graphics.h>
#include <conio.h>

void main()
{
int d,m;

d=DETECT;

initgraph(&d,&m,"c:\\tc\\bgi");

circle(200,200,30);

//making one more circle of greater radius

circle(200,300,50);

getch();

closegraph();
}


Output :




0 comments:

Post a Comment