Right-Aligned Price Column
hardQuestion 317Three prices 5.5, 12.25, and 100.0 are given. Print each on its own line, right-aligned in an 8-character field with exactly 2 decimals, so the decimal points line up (see Expected Output).
Use <iomanip> with right, setw(8), fixed, and setprecision(2).
Expected output
5.50 12.25 100.00
= newline. The output ends with a newline, so print one after the last line.
Hints4 available
Sign in to use hintsTopics
Printing
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · 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.