โ Back to Printing
Question 297
Currency Format
Currency Format
Adouble price = 19.99is given. Print it as a dollar amount with exactly 2 decimal places: $19.99 Use<iomanip>withfixedandsetprecision(2).
Expected Output:
$19.99
Topics:
Printing
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.