Tag: c++ precision

28
Jul
2015

c++ precision

C++ precision example: #include<iostream> #include<iomanip> using namespace std; int main() { double f; f=3.12159; cout<<f<<‘\n’; cout<<setprecision(3)<<f<<endl; cout<<setprecision(5)<<f<<endl;…