TEAM CODING-BCA

C Program for Drawing a Circle and Color it using Standard Library Function

C Program for Drawing a Circle and Color it using Standard Library Function :

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

void main()
{
int x,y,r;
int gd,gm;
detectgraph(&gd,&gm);
initgraph(&gd,&gm,"C:\\TurboC3\\BGI");
clrscr();
printf("\n\n\tEnter the co-ordinates of circle center : ");
scanf("%d %d",&x,&y);
printf("\n\n\tEnter the radius : ");
scanf("%d",&r);
circle(x,y,r);
setfillstyle(SOLID_FILL,RED);
floodfil(x,y,WHITE);
getch();
closegraph();
}



                                                        Output

No comments:

Post a Comment