+ 2

code to draw a circle

2nd Jul 2016, 3:07 PM
Rajiv Singh
Rajiv Singh - avatar
2 Réponses
+ 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.
2nd Jul 2016, 3:47 PM
Satan 666
Satan 666 - avatar
+ 2
graphics.h is outdated...but there are better alternatives
2nd Jul 2016, 4:40 PM
Mukul Kumar
Mukul Kumar - avatar