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
Program1: Write a program to find the factorial of a given number. The input is user given. Final output is printed out on to the screen. Program2: Write a program to gene

Write a C program to calculate the output Y for a given value of X for the following formula   Y=X 2 + 2X +3   #include stdio.h   void main()   {   char promt;   float y,x

Is it possible to create your own header files? - Yes, it's possible to create a customized header file. - To do this, you just need to include function prototypes that you

I started preparing an alternative cryptocurrency and I am way over my head. I would like help in making modifications to the open source files and then help with deployment. I wil

manupulates operator precidence

There are ''''n'''' ants on a ''''n+1'''' length rod. The ants are numbered from 1 to n and are initially placed at positions starting from position 1 till position n. They are mov

to calculate the amount to be paid by a customer buying yummy cupcakes for his birth day party

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

how much is it to fix a small data struct in a sorted list that pass itemtypes. all the code is written just logical errors

Aim: To implement a program to add two polar coordinates using operator overloading. Code:                       #define PI 3.14 class polar {             double