+ 2
code to draw a circle
2 Answers
+ 2
#include<graphics.h>
#include<conio.h>
void main()
{ clrscr();
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:/tc/bgi");
circle(200,200,50);
getch();
closegraph();
}
// 200,200 are the center coordinates of the circle and 50 is the radius of the circle.
// the c:/tc/bgi is the location where your bgi files are stored.
// also this program is written in turbo c++ (an old compiler) , i don't know the syntax for new compilers.
+ 2
graphics.h is outdated...but there are better alternatives