圆弧插补程序,求解疑
这是一段圆弧插补程序,运行没有错误,但就是没有结果,求帮助#include "stdio.h"
main()
{
int x0,y0,xe,ye,F,i,j,a;
printf("顺弧时a=1,逆弧时a=0");
printf("输入 x0 y0 xe ye a");
scanf("%d%d%d%d%d%d",&x0,&y0,&xe,&ye,&a);
F=0;
if(a==1)
{i=-x0;
j=-y0;}
else
{i=x0;
j=y0;}
do
{
if(i>=0)
{
if(j>=0)
{
if(F>=0)
{printf("-x,");
F=F-2*i+1;
i--;}
else
{printf("+y,");
F=F+2*j+1;
j++;}
}
else
{
if(F>=0)
{printf("+y,");
F=F+2*j+1;
j++;}
else
{printf("+x,");
F=F+2*i+1;
i++;}
}
}
else
{
if(j>=0)
{
if(F>=0)
{printf("-y,");
F=F-2*j+1;
j--;}
else
{printf("-x,");
F=F-2*i+1;
i--;}
}
else
{
if(F>=0)
{printf("+x,");
F=F+2*i+1;
i++;}
else
{printf("-y,");
F=F-2*j+1;
j--;}
}
}
}
while(i==xe,j==ye);
printf("end");
}