well in that case try this

the angle is expressed in radians ,Am i right?Code:double sine(float x) { int i,n; int sign = -1; double sum = x,power=x,fact = 1.0,psum=0.0; for (i = 1; fabs(fabs(sum) - fabs(psum)) > 0.0000000001; ++i) { psum=sum; power = power * x *x; n = (2*i+1); fact = fact * n * (n-1); sum += sign * power/fact; sign = -sign; } printf("n value is %d\n",i); return sum; }