Tips and Calculator EMT 1111 – D304

Making these codes helps figure out the total of certain of items on the list. On the first image, we have the variable “meal” and we are going to set it up to a value which will be 44.50. Next, we do the same to tax so we set the variable to a value which will be 0.0675. We do the same thing again with tips. We set the value for tips which will be 15%, but we put the value to a decimal. In the next slide, we calculate the cost of the meal by adding itself twice and then multiply it with the tax and when we run the code, the end result will be the total cost of the meal. On the last slide, we assign the total to the sum on a different line and we set the total equal to the meal two times and we multiply it with the tip which should print the result.