#include"graphics.h"
#include"conio.h"
#include"math.h"
#define PI 3.14
void main()
{
int h,k;
float r,x,y,t,t1,t2,j;
int i=DETECT,M,g;
clrscr();
initgraph(&i,&M," ");
printf("Enter the values of h,k,r,t1,t2:");
scanf("%d%d%f%f%f",&h,&k,&r,&t1,&t2);
if(t1
for(j=0;t1<=t2;j++)
{ delay(100);
x=r*cos((PI/180)*(-j));
y=r*sin((PI/180)*(-j));
putpixel(h+x,y+k,1);
t1++;
}
}
else
{
for(j=0;t2<=t1;j++)
{ delay(100);
x=r*cos((PI/180)*(j));
y=r*sin((PI/180)*(j));
putpixel(h+x,y+k,1);
t2++;
}
}
getch();
}
No comments:
Post a Comment