title: series using program
body: <p>I'm trying to implement my own sin(x) function via maclaurin series using C program, 
  this is what I have so far, I worked everything on paper first then I tried to implement it it in a code</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #define PI 3.141592653589793238462643383
  int main()
  {
  int x,nOfterms,term=1,i,j;
  double numerator,sum=0.0,radius;
  long int denominator;
  printf("\n\t\tINPUT:");
  printf("\n\t\t------");
  printf("\n\t\tEnter the value for x in degrees:  ");
  scanf("%d",&amp;x);
  printf("\n\t\tEnter the value for number of terms:  ");
  scanf("%d",&amp;nOfterms);
  printf("\n\t\tOUTPUT:");
  printf("\n\t\t-------");
  radius=x*(PI/180.0);
  printf("\n\t\tThe radius value for the given x value is:  %lf",radius);
  for(i=1;i&lt;=nOfterms;i+=2)
   {
       numerator=1.0;
       denominator=1;
       for(j=1;j&lt;=i;j++)
       {
          numerator=numerator*radius;
          denominator=denominator*j;
       }
      sum=(sum+numerator)/(denominator*term);
      term=term*-1;
   }
  printf("\n\t\tThe value for sin %d is:  %lf",x,sum);
  printf("\n\n\n");
  return 0;
  }
  </code></pre>
  
  <p>I can't use the math.h at all in my code or so does the professor say, 
  My output is all zeros which is not right obviously, also I would appreciate if anyone could help me with this, also if anyone can offer a way where I can see each iteration for each number of term of the series on the screen before I arrive at the answer, tried to place the last printf in the for loop but I'll end up with weird symbols and numbers.</p>