|
|
| To draw an arc on the output screen whose parameters are user defined? |
#include<conio.h>
#include<graphics.h>
void main()
{
int x,y,r;
float stangle,edangle,rad;
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
clrscr();
printf("Enter the center coordinates and radius of arc : ");
printf("x : ");
scanf("%d",&x);
printf("y : ");
scanf("%d",&y);
printf("Enter the starting and end angles of arc ");
printf("Starting angle : ");
scanf("%f",&stangle);
printf("End angle : ");
scanf("%f",&edangle);
printf("Enter the xradius and yradius of the arc ");
printf("radius : ");
scanf("%f",&rad);
printf("The required arc is : ");
arc(x,y,stangle,edangle,rad);
getch();
closegraph();
}
|