Tip tax and total design a program that calculates the


1. Miles-per-Gallon A car's miles-per-gallon (MPG) can be calculated with the following formula: MPG = Miles driven / Gallons of gas used Design a program that asks the user for the number of miles driven and the gallons of gas used. It should calculate the car's miles-per-gallon and display the result on the screen.

2. Tip, Tax, and Total Design a program that calculates the total amount of a meal purchased at a restaurant. The program should ask the user to enter the charge for the food, and then calculate the amount of a 15 percent tip and 7 percent sales tax. Display each of these amounts and the total.

Solution Preview :

Prepared by a verified Expert
Macroeconomics: Tip tax and total design a program that calculates the
Reference No:- TGS01598336

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)