-
In this Tip Calculator I tried to create a restaurant receipt with tax and tip included. In order to do that I have created a variable call “meal” and assigned this variable a value of 44.50 dollars which is cost of the meal. Than I have created another variable call “tax” and assign the value of 6.75% in decimal form which is 0.0675 . After that I created another variable call “tip” and assign the value 15% in decimal form which is 0.15 . In order to find the total cost of meal with tax I reassigned the variable meal to the value of itself + itself*tax. This gives us the total cost of the meal . Now after that I need to find out How much should be the tip. So to find that out Assign the variable total to the sum of meal + meal*tip. This gives us the total amount needed to pay for the meal and tip included.