Program in Computer Graphics to Design Cones

in computergraphics •  3 years ago 

4cones.jpg

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gd=DETECT,gm,i,midx,midy;
initgraph(&gd,&gm,"C:\TurboC3\BGI");
midx=getmaxx()/2;
midy=getmaxy()/2;
for(i=0;i<=80;i++)
{
circle(midx+i,midy+i,i);
circle(midx-i,midy-i,i);
circle(midx-i,midy+i,i);
circle(midx+i,midy-i,i);
setcolor(4*i);
}
getch();
closegraph();
}

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

👍