+ 1
How can we print some specific number after point in floating number ? I want output 3.00
float a; cin>>a; cout<<a; input : 3 output : 3.000000 in c we have used printf("%.2f",a); Here what we need to do?
1 Réponse
+ 3
I C++ you can use the function std::setprecision from the <iomanip> library: http://www.cplusplus.com/reference/iomanip/setprecision/