why we did the addition of meal twice then divided with tax and tip?


If you want to keep the original amount and add more to it, then you’ll end up with original_amount + extra
And in this case the thing that’s being added is based on the original amount so therefore the original amount will be mentioned when computing it

If you start out with 10 and want to add 20%, you’d do:

10 + 10 * 0.2


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.