DEV Community

Mohammed Salah
Mohammed Salah

Posted on

C++17th code--> [Constant (pi) & iomanpi ] with Precision (51)

#include<iostream>
#include<iomanip>
using namespace std; 
int main()
{
const  double pi=22.0/7.0;
cout<<fixed<<setprecision(51); 
cout<<"\n\t Pi = "<<pi<<endl; 
cin.get();
system("pause"); 
return 0 ; 
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Retry later
Retry later