CJCoding With Joseph
15free / daySign inCreate account

Discount Tiers

The variable total is an order total in whole dollars. Apply a discount with an if / else if chain: orders of 200 or more get 25 off, orders from 100 to 199 get 10 off, and smaller orders get nothing off. Subtract the discount from total (it is declared with let so it can change) and print Total: <total> once after the chain.

Expected Output:

Total: 140

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

Hints3 available
Topics:
If Statements
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (clog, fn, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.