← Back to User Input
Question 188
Subtotal Tax And Total
Subtotal Tax And Total
Read a unit price as a decimal number and a quantity as a whole number, then print three lines with two decimals each using :0.2f: Subtotal: <price times quantity>, Tax: <13 percent of the subtotal> and Total: <subtotal plus tax>. Input: two lines, the price then the quantity, no prompts.
Expected Output:
Subtotal: 12.00 Tax: 1.56 Total: 13.56
= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
User Input
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.