โ Back to User Input
Question 242
Add Sales Tax to a Price
Add Sales Tax to a Price
Read a price (a decimal number) from standard input, add 8% sales tax, and print the total rounded to exactly two decimal places. The total isprice * 1.08. For example, if the input is100, print: 108.00 Useprintfwith%.2fand no trailing newline.
Expected Output:
108.00
Topics:
User Input
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (p, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.