fork download
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. float a = 9.567;
  9.  
  10. cout << setprecision(2) << a;
  11. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
9.6