Saturday 17 December 2011

Draw a colorful Circle


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

void main(void)
{
    int driver=DETECT, mode;
    int xc1=320, yc1=240;


       initgraph(&driver, &mode, "c:\\TC\\bgi" );
         setcolor(7);                     //edge color
         setfillstyle(SOLID_FILL,GREEN);  // fill inside the circle
         circle(xc1,yc1,100);             // create a circle
         floodfill(xc1,yc1,7);            // flood color
     getch();
    closegraph();
}


Output:
















If you have any question, you can ask me freely...

2 comments:

Unknown said...

respected sir , i just use your program for my assignment . it was much helpful . tahnks alot for doing this sympathy for students so that u shared your knowledge ., sir can u give me your email adress so that i can contact you in future for any query . i'll be thankful to you .

regards
maryam khalid

MuzammilVersiani said...

Hi Maryam,
I am glad to hear this. You can contact me in the future on this id:

versiani.muzammil[at]gmail.com

Kind Regards

Post a Comment