PI constant in C++

  • Thread starter Thread starter Arash_89
  • Start date Start date
A

Arash_89

Guest
Hello,


How can I used constant PI in C++?

The following code doesn't work in Visual C++.


#include <iostream>
#include <cmath>
#define _USE_MATH_DEFINES
using namespace std;
int main()
{
cout<< M_PI;

return 0;
}

Continue reading...
 
Back
Top