1. Total Purchase A customer in a store is purchasing five items. The prices of the five items are: Price of item 1 = $ 12.95 Price of item 2 = $ 24.95 Price of item 3 = $ 6.95 Price of item 4 = $ 14.95 Price of item 5 = $ 3.95 Write a program that holds the prices of the five items in five variables. Display each item’s price, the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is 6%.

  2. Miles per Gallon A car holds 12 gallons of gasoline and can travel 350 miles before refueling. Write a program that calculates the number of miles per gallon the car gets. Display the result on the screen. Hint: Use the following formula to calculate miles per gallon ( MPG): MPG = Miles Driven / Gallons of Gas Used

Recommended Answers

All 2 Replies

Have you tried to do these yet? Is there something specific you're having trouble with?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.