题目是求(1+sin0.1)*(1+sin0.2)....(1+sinx)
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{float a,b,c;
a=0.1;
c=1;
printf("please enter the b\n");
scanf ("%f",&b);
while(a<=b)
{
a=a+0.1;
c*=(1+sin(a));
}
printf("the key is %f",&c);
return 0;
}
不知道为什么我输入后出来的答案一直是0.000000是不是不能用sin计算请高人赐教