fork(1) download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6. double amount = 72.0;
  7.  
  8. stringstream amtstr;
  9. amtstr << setprecision(2) << fixed << amount;
  10. cout << amtstr.str() << endl;
  11. }
Success #stdin #stdout 0s 3228KB
stdin
Standard input is empty
stdout
72.00