8-LEAVED ROSE



#include<graphics.h>
#include<math.h>
main()
{
int gd=DETECT,gm,x,y,i,j;
float a;
initgraph(&gd,&gm,"c:\\tc\\bgi");
setcolor(RED);
x=getmaxx()/2;
y=getmaxy()/2;
line(x,0,x,480);
line(0,y,640,y);
setcolor(LIGHTBLUE);
outtextxy(20,20,"8 LEAVED ROSE");
for(a=0;a<22;a+=0.01)
{
putpixel(x+100*(cos(4*a)*cos(a)),y-100*(cos(4*a)*sin(a)),YELLOW);
delay(100);
}
getch();
}

Go to the programs pageclick here!!

Hosted by www.Geocities.ws

1