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
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Introduction to I/O interfacing, discuss microcontrollers applications in industry. Detailed product design specifications that have sections on both hardware and software inclu


A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of t

Objective of this Program: (a) To learn more about modularization of a program into independent modules, (b) To use arrays in a program, (c) To get some experience with us

Nested Classes Many a times, it becomes essential to have a class contain properties of two other classes. One way is to explain a class within another - that is a class with m

What is the difference between = symbol and == symbol? - The = symbol is generally used in mathematical operations. It's used to assign a value to a given variable whereas the

removing jewel from a necklace

Literals (Constants) Constants are data storage locations whose address is not accessible for the user. Their value is not altered during the course of the program. Literal

HWID Spoofer for Windows 7, 8 x64 Project Description: I want a simple program that will spoof my hardware id. I should be able to prepare the id to spoof to in the program a