#include <graphics.h>
#include <math.h>
#define PI 3.1415926
main()
{
int x,y,r,rl;
double a;
int gdrive=9,gmode=2;
initgraph(&gdrive,&gmode,"C:\\tc");
printf("Input Radus(<150)\n");
scanf("%d",&r);
cleardevice();
setbkcolor(MAGENTA); setcolor(WHITE);
for (a=0; a<2*PI; a+=PI /27)
{
x=r*cos(a)+320; y=r*sin(a)+240;
rl=abs(x-320); circle(x,y,rl);
}
getch();
closegraph();
}
#include <math.h>
#define PI 3.1415926
main()
{
int x,y,r,rl;
double a;
int gdrive=9,gmode=2;
initgraph(&gdrive,&gmode,"C:\\tc");
printf("Input Radus(<150)\n");
scanf("%d",&r);
cleardevice();
setbkcolor(MAGENTA); setcolor(WHITE);
for (a=0; a<2*PI; a+=PI /27)
{
x=r*cos(a)+320; y=r*sin(a)+240;
rl=abs(x-320); circle(x,y,rl);
}
getch();
closegraph();
}