title: Error in C sine(x) Approximating
body: <p>I am trying to Calculate the value of Sin(x) using taylor series ie:x-x^3/3!+x^5/5!
  What I tried is this code but it sort of giving me error!</p>
  
  <pre><code>int n;
  int factorial;
  float sum=0;
  float angle;
  int sign=1;
  int i,j;
  
  printf("Please Enter angle in degrees:\n");
  scanf("%f",&amp;angle);
  angle=angle*3.14/180;
  
  printf("Please Enter Number of terms:\n");
  scanf("%d",&amp;n);
  for (i=1;i&lt;=n;i++){
      factorial=1;
      for (j=1;j&lt;=(2*i-1);j++)
      factorial=factorial*j;
  sum=sum+sign*(pow(angle,j)/factorial);
  sign*=-1;
  }
  printf("Sum up to %d terms is %f",n,sum);
  </code></pre>