Jun-16-2018, 09:56 PM
Code aside, a $45 meal after tip (20%) and tax (7%) will not end up being less than $45 (the number you cited as the book saying, 7.78). It would be $57.15 if you tip on the meal amount and $57.78 if you tip on the meal after tax has been added.
I suggest you work out the math separately, then try to code that up independent of the book, if you want to take another look at this problem.
With regard to the book - you're either not following it, or it's a bad book and not worth continuing with.
I suggest you work out the math separately, then try to code that up independent of the book, if you want to take another look at this problem.
With regard to the book - you're either not following it, or it's a bad book and not worth continuing with.