Draw a circle in c program , C/C++ Programming

Draw a circle in c program:

void main()

{

clrscr();

int i,r=50,t,j,x,y;

int gd,gm;

gd =DETECT;

initgraph(&gd,&gm,"");

for(x=50;x<=150;x++)

for(y=50;y<=150;y++)

{

  if((x-100)*(x-100) +(y-100)*(y-100) <=2510&&x*x+y*y>=2490)

putpixel(x,y,10);

delay(1);

}

getch();

}

 

 

Posted Date: 10/18/2012 6:35:23 AM | Location : United States







Related Discussions:- Draw a circle in c program , Assignment Help, Ask Question on Draw a circle in c program , Get Answer, Expert's Help, Draw a circle in c program Discussions

Write discussion on Draw a circle in c program
Your posts are moderated
Related Questions
void main() { int *p, *q, i ; p=(int*)100; q=(int*)200; i=q-p; printf("%d",i); } }


Define register with bit fields? We could define register simply with bit fields: struct DISK_REGISTER { unsigned ready:1; unsigned error_occured:1; unsigned disk_spinni

Problem Description Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new techn

Why should I employ new instead of truthful old malloc()? A: Constructors/destructors, type safety, overridability. Constructors/destructors: unlike malloc(sizeof(Fred)), new

Using a Friend Using a friend function is quite easy. The following example explains a friend function to access members of two classes. class Bclass;

Please give me a programming code of first & follow with c or c++ laqnguage .When anyone give me the programming code of first & follow please explain every lines with the help

#questionAt a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets

C language lets us do this in a structure definition by putting: bit length after the variable that is. struct packed_struct { unsigned int f1:1; unsigned int f2:1; unsigned

n this problem u given a board in which some of the elements are placed as shown in diagram below .each element represent a color .fill the other elements in the board such that no