CS 140 - Lab 3 Instructions

We will do this lab in class on Thursday September 4.

Objectives

  1. Practice with Java's arithmetic expressions and variables.
  2. Write a Java program to calculate change (like a cashier gives back).

Making Change

Finish the change making program that we started in class. Do this so it correctly displays the number of twenties, tens, fives, ones, quarters, dimes, nickels, and pennies for a dollar amount entered by the user. Below is an example execution of my change making program.

Enter amount to make change for:  $97.28

Twenties: 4
Tens: 1
Fives: 1
Ones: 2
Quarters: 1
Dimes: 0
Nickels: 0
Pennies: 3