title: C/C++ Code not working with DEV C++. (floating point or type)
body: <pre><code>#include&lt;stdlib.h&gt;
  #include&lt;stdio.h&gt;
  
  long double fact(unsigned long int n)
      /*The factorial of a positive integer by recursion*/
  {
      if (n==0)
          return 1;
      else
          return n*fact(n-1);
  }
  
  int main()
  {
      long double  sum, n;
      int i, m;
      printf("\t/*Code to find the approximate value of e */");
  check:
      printf("\n\n\tPlease Enter the value of n := ");
      scanf("%lf", &amp;n);
      sum=0;
      for (i=0; i&lt;=n; i++)
          sum +=1/(fact(i));
      printf("\n\n\tThe appriximate value of e := %.15lg\n\n\t", sum);
      printf("Let's do this again? 1/ YES Any key/ NO := ");
      scanf("%d", &amp;m);
      if (m==1)
          goto check;
      else (1);
      return 0;
  }
  </code></pre>
  
  <p>This code worked perfectly well with Visual C++ 2010 but not with DEV C++. It kept on returning zero for the value of e. Can someone please explain why! Thanks!</p>