title: Pi in C language
body: <p>So i was trying to get the value of pi in c (IDE = DEV C++) so i am using long double in this and the result it is giving me is a complete set of zeros
  here is the program</p>
  
  <pre><code>int main() 
  {
      long double rootOf3;
  
      rootOf3 = (22.0/7.0);
  
      printf("%lf", rootOf3);
      system("pause");
      return 0;
  }
  </code></pre>
  
  <p>after that i found out that the value of pi is not precise in c and is already declared in math.h and when  i tried to get the value with this code </p>
  
  <pre><code>int main() 
  {
  
      printf("%f", M_PI);
      printf("%e", M_PI);
      printf("%lf", M_PI);
      system("pause");
      return 0;
  }
  </code></pre>
  
  <p>i get these value </p>
  
  <pre><code>3.1415933.141593e+0003.141593Press any key to continue . . .
  </code></pre>
  
  <p>so my questions </p>
  
  <p>1) what is the mistake in the first program and can i get the values of pi with the above code using long double<br>
    2)is it true that in c the value of pi is not accurate?an why am i not getting the entire pi value assigned in math.h</p>
  
  <p>thanks</p>