Answers for "precision c++"

C++
1

precision c++

fixed - it is used to forcefully follow precision zero.
example: for 0.5 below code will print 0.500000

cout<<fixed<<setprecision(6)<<num<<endl;
Posted by: Guest on August-16-2021
3

set precision with fixed c++

int x = 109887;
cout << fixed << setprecision(3) << x;
Posted by: Guest on July-06-2020

Browse Popular Code Answers by Language