fork(1) download
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <locale>
  4.  
  5. int main()
  6. {
  7. int number = 123; // 1 dollar and 23 cents
  8. std::cout.imbue(std::locale("en_US.utf8"));
  9. std::cout << std::showbase << std::put_money(number) << '\n';
  10. }
  11.  
Success #stdin #stdout 0s 5076KB
stdin
Standard input is empty
stdout
$1.23