#include<graphics.h>
#include<math.h>
void main()
{
int x_cor,y_cor,radius,i;
int gd=DETECT,gm;
printf("Enter Centre Co-ordinates of a circle :-
");
scanf("%d %d",&x_cor,&y_cor);
printf("\n Enter the Radius of a Circle:- ");
scanf("%d",&radius);
initgraph(&gd,&gm," ");
for(i=0;i<=radius;i++)
{
cleardevice();
circle(x_cor,y_cor,radius);
line(x_cor,y_cor,x_cor+radius,y_cor);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(x_cor+i,y_cor-32,"M");
delay(50);
}
getch();
}
1 comments:
Write commentsGh
Reply