need to have an input of money to pay for an item and amount given.
to return change due with denomination format:
20 dollar bills
10 dollar bills
5 dollar bills
1 dollar bills
quarters
nickels, dimes, pennies, etc.
so far i got this:
import java.util.Scanner;
public class Cashier
{
//*****************************************************************
// Creates change to be given to customer from cashier.
//*****************************************************************
public static void main(String[] args)
{
double a;
double b;
Scanner scan = new Scanner (System.in);
System.out.print ("Enter total amount:$ ");
a = scan.nextDouble();
System.out.print ("Enter amount given:$ ");
b = scan.nextDouble();
System.out.print ("Change:$" + (b - a) );
}
}