C++ code for circle using circle function in Computer Graphics
#include<conio.h>#include<math.h>
#include<graphics.h>
#include<dos.h>
#include<stdlib.h>
void main()
{
int x , y , radius;
cout<<"enter x-cordinate for circle";
cin>>x;
cout<<"enter y-cordinate for circle";
cin>>x;
cout<<"enter radius for circle";
cin>>radius;
int d=DETECT,m;
initgraph(&d,&m,"c:\\tc\\bgi");
for(int i=0;i<100;i++)
{
circle(x,y,radius);
}
getch();
closegraph();
}
0 comments:
Post a Comment