ITEC 120 LAB 4 Back to Lab index page

Donut sales calculator

Delicious SugarBomb donuts are 65 cents each. Write a program which asks the user how many donuts they would like to buy and tells the user the total cost of the donuts in dollars and cents. Be sure your program displays the dollars just like this example:

Sample run:
Program displays:

Delicious SugarBomb donuts are 65 cents each!
How many would you like?

User enters: 7
Program displays: 7 donuts cost 4 dollars and 55 cents.

You'll use the Scanner class again to read the number entered by the user. (Look at lab 3)
Use a contant when you write this program. (What should it be called?)
How many variables will you need for this program? What should they be called? (USE ints!)