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