CJCoding With Joseph
15free / daySign inCreate account

Sale Price

Read a price as a decimal number and a discount as a whole-number percent, then print two lines with two decimals each using :0.2f: You save: <price times percent divided by 100> and Sale price: <price minus the saving>. Input: two lines, the price then the percent, no prompts.

Expected Output:

You save: 20.00
Sale price: 60.00

= newline. The output ends with a newline — print one after the last line.

Hints3 available
Topics:
User Input
📥 Auto-Input:
80\n25\n
This input is automatically fed to your program's stdin
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.