title: Change Machine Math & Logic Errors
body: <p>I've posted this program once before but realized I was overthinking it by adding loops and what not. I've paired it down a bit but still running into problems. The program is supposed to be a change machine. After the user inputs price, the program should round it up to the nearest dollar then output how much change will be dispensed and a count of which coins. The output is completely wrong at this point. I'm very new to programming and I'm at a loss.</p>
  
  <pre><code>package changemachine;
  
  import java.util.Scanner;
  import java.text.*;
  
  public class Main 
  {
  
    public static void main(String[] args) 
     {   
      Scanner scan = new Scanner(System.in);
  
      System.out.println("Enter Purchase Price: ");
  
      double price = scan.nextDouble();
  
      int newPrice = (int)(price*100);
  
      int paid = (int)(newPrice+1);
  
      int change = (int)(paid - newPrice);
  
      int quarters = (int)(change/25);
      int dimes = (int)((change%25)/10);
      int nickels = (int)((change%25%10)/5);
      int pennies = (int) (change%25%10%5);
  
      System.out.println("Dispensing: " + quarters + " Quarters,"
            + dimes + "Dimes," + nickels + "Nickels," 
            + pennies + "Pennies.");
  
      System.out.println("Program written by Ashley ");
   }
  }
  </code></pre>