Program to draw arcs
Program to draw arcs
#include <graphics.h>
#include <conio.h>
void main()
{
clrscr();
int d,m;
int x,y,r;
int sangle,eangle;
int midx;
int midy;
printf("Enter x axis:");
scanf("%d",&x);
printf("Enter y axis:");
scanf("%d",&y);
printf("Enter radius:");
scanf("%d",&r);
printf("Enter starting angle:");
scanf("%d",&sangle);
printf("Enter ending angle:");
scanf("%d",&eangle);
d=DETECT;
initgraph(&d,&m,"c:\\tc\\bgi");
arc(x,y,sangle,eangle,r);
midx=getmaxx()/2;
midy=getmaxy()/2;
ellipse(midx,midy,sangle,eangle,x,y);
getch();
closegraph();
}
Output :
Labels:
draw arcs in c,
Program to draw arcs
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment