answersLogoWhite

0


Best Answer

#include

#include

#include

void main()

{

int gd=DETECT,gm=4,i;

initgraph(&gd,&gm,"c:\\tc\\bgi");

setcolor(3);

for(i=0;i<150;i+=5)

{

circle(300,300,i);

}

getch();

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

#include<io stream.h>

# include<conio.h>

# include<graphics.h>

# include<math.h>

void main()

{

int gd=DETECT,gm;

int r,x,y,p,xc=320,yc=240;

initgraph(&gd,&gm,"C:\\TC\\BGI");

cleardevice();

printf("Enter the radius ");

scanf("%d",&r);

x=0;

y=r;

putpixel(xc+x,yc-y,1);

p=3-(2*r);

for(x=0;x<=y;x++)

{

if (p<0)

{

y=y;

p=(p+(4*x)+6);

}

else

{

y=y-1;

p=p+((4*(x-y)+10));

}

putpixel(xc+x,yc-y,1);

putpixel(xc-x,yc-y,2);

putpixel(xc+x,yc+y,3);

putpixel(xc-x,yc+y,4);

putpixel(xc+y,yc-x,5);

putpixel(xc-y,yc-x,6);

putpixel(xc+y,yc+x,7);

putpixel(xc-y,yc+x,8);

}

getch();

closegraph();

}

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Cls

screen 9

color 3,0

line (160,100),80,2

line (160,100),60,2

paint (90,100),3,2

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a C Program to draw concentric circles using mid-point algorithm?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What do you call a set of circles that share the same midpoint?

Concentric


What is the point that is the same distance from any circle?

There is such a point only if all the circles are concentric.


What is two or more circles with same center called?

Concentric circles.


Examples of concentric circles?

Concentric circles are circles within other circles. Some examples of concentric circles are archery targets, the bullseye on a dart board, the eye, a wheel with a hubcap.


What is the use of concentric circles?

The use of concentric circles is most commonly used on a target. Concentric circles are placed around a target in which each concentric circle has the same center.


Are coplanar circles that have the same center called concentric circles?

Concentric Circle


Draw Create Concentric Circles using c?

Create Concentric Circles.


What are Circles having same centre but different radii called?

Concentric circles are circles with the same common centre.


Concentric circles on the disk surface?

Concentric circles, are circles within circles. Each concentric circle on the surface of a disk represents a track, the narrower the circle is, the more data can be stored on the disk.


Non concentric circle?

Non concentric circles are circles that do not share the same center point.


Do concentric circles have the same area?

Concentric circles have the same center. They are not necessarily the same size. If two concentric circles have the same area, then they are congruent, meaning they coincide when superimposed.


What word would you use to describe two circles of different radius but of the same center?

They are said to be concentric circles.