这个sin(x)的程序为什么也run不出来
#include<stdio.h>#include<math.h>
float sin(float x)
{
float feizi=x,m,s=1,sum=x;
int feimu=1,r=1;
for(feizi=x*x*x;;feizi=feizi*x*x)
{
r++;
if(r%2!=0)
feimu=feimu*r*(r-1);
s=-s;
m=feizi/feimu*s;
while(fabs(m)>=1e-6)
sum=sum+m;
}
return sum;
}
void main()
{
float item,a;
scanf("%f",&a);
item=sin(a);
printf("%f\n",item);
}