CJCoding With Joseph

Currency Format

A double price = 19.99 is given. Print it as a dollar amount with exactly 2 decimal places:

$19.99

Use <iomanip> with fixed and setprecision(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.