Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+6 votes

In the first question shes has :

Enter sales price (-1 to stop): 8000
Commission is $160.00

Enter sales price (-1 to stop): 15000
Commission is $275.00

Enter sales price (-1 to stop): 30000
Commission is $450.00

Enter sales price (-1 to stop): -1

Total sales commission = $885.00

but the arithmetic is wrong. She has us do $350 + 1% for a sale over 20000.
but if you do 30000 * .01 that is 300 + 350 = 650 not 450.

my output is:
Enter sales price (-1 to stop): 8000
Commission is $160.00

Enter sales price (-1 to stop): 15000
Commission is $425.00

Enter sales price (-1 to stop): 30000
Commission is $650.00

Enter sales price (-1 to stop): -1

Total sales Commission = $1235.00

this also doesnt work for the computation of 15000.

am i right or wrong?

asked in CSC211_Winter2018 by (1 point)

2 Answers

+3 votes

You are being too generous. When the sales price is over 10000, the commission is 1.5% of the amount OVER 10000. In other words, 200 + 0.0.15 (15000-10000).

Same idea for the price over 20000.

answered by (1 point)
+1

got it! thank you for the help.

+2 votes

350 + (.01 *(price over 20000-20000))

answered by (1 point)
...