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