Your arithmetic is not at all right. You should go back to the flow chart that you created (or should have) and rethink it. One problem is the way you use the discount.
A flowchart? Him?
It sounds like he rolled out of bed on Friday, and realized that he has an assignment due for this class for Monday.
Go back to the pencil and paper and figure out what the math should be. If you don't know the math, there is no way you can program this properly.