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
hwat is the area fsdjlakl;aeklfjtealrtl;gka

There are so many different concepts related with OOP (Object-oriented programming) such as: Class Object Inheritance Polymorphism Abstraction Encapsulation

C Program to Check  EVEN & ODD NO   main() {           int n, a;           clrscr();           printf("ENTER ANY NUMBER: ");           scanf("%d", &n);

Constructors and Destructors: A Class is defined as constructor by declaring a constructor in the form of function inside the class.  In other word a function in the name of


At 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 with thes

The Preprocessor Directives A preprocessor directive which starts with a hash '#' ,is an instruction to the preprocessor, which acts on the source code before the compilation p

Multilevel Inheritance In multilevel inheritance there is a parent class , from whom we derive another class . now from this derived class we can derive another class and so on


Write a C++ program with header and source files to store street addresses using the Doubly Linked List ADT. Modify the Node class from Lab Assignment 3 so that it becomes a node i