/* .......Works on Win XP */
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
int x1,y1;
void pt(int x,int y)
{putpixel(x+x1,y+y1,RED);
putpixel(-x+x1,y+y1,RED);
putpixel(-y+x1,x+y1,RED);
putpixel(-y+x1,-x+y1,RED);
putpixel(-x+x1,-y+y1,RED);
putpixel(x+x1,-y+y1,RED);
putpixel(y+x1,-x+y1,RED);
putpixel(y+x1,x+y1,RED);
}
void main()
{
int r,gd=DETECT,gm,x,y,d;
clrscr();
initgraph(&gd,&gm,"C:\\TC\\BGI"); /*Sometimes it may be "c:\\tc\\bgi" , It depends machine to mac..*/
printf("enter radius");
scanf("%d",&r);
printf("enter center of the circle-");
scanf("%d%d",&x1,&y1);
x=0;
y=r;
d=1-r;
while(x<=y)
{
pt(x,y);
if(d<0)
d=d+2*x+3;
else
{d=d+2*(x-y)+5;
y--;
}
x++;
}
getch();
closegraph();
}
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
int x1,y1;
void pt(int x,int y)
{putpixel(x+x1,y+y1,RED);
putpixel(-x+x1,y+y1,RED);
putpixel(-y+x1,x+y1,RED);
putpixel(-y+x1,-x+y1,RED);
putpixel(-x+x1,-y+y1,RED);
putpixel(x+x1,-y+y1,RED);
putpixel(y+x1,-x+y1,RED);
putpixel(y+x1,x+y1,RED);
}
void main()
{
int r,gd=DETECT,gm,x,y,d;
clrscr();
initgraph(&gd,&gm,"C:\\TC\\BGI"); /*Sometimes it may be "c:\\tc\\bgi" , It depends machine to mac..*/
printf("enter radius");
scanf("%d",&r);
printf("enter center of the circle-");
scanf("%d%d",&x1,&y1);
x=0;
y=r;
d=1-r;
while(x<=y)
{
pt(x,y);
if(d<0)
d=d+2*x+3;
else
{d=d+2*(x-y)+5;
y--;
}
x++;
}
getch();
closegraph();
}
Tiang Minjouw | Titanium Ring - ITUNICARD.com
ReplyDeleteTiang Minjouw has a unique 2021 ford escape titanium hybrid quality unique titanium max trimmer jewelry and style. titanium white dominus With a sophisticated design titanium camping cookware made with metal and copper titanium engine block elements
more tips here horse dildo,horse dildo,sex toys,vibrators,dildos,love dolls,dog dildo,wolf dildo,sex toys Read More Here
ReplyDelete