title: How to convert money to change
body: <p>trying to convert a entered number into quarters, nickels, dimes, and pennies. Having a few problems: </p>
  
  <pre><code>    public class Coins {
  public static void main(String[] args){
  
  private int quarters, dimes, nickels, pennies;
  
  public void CoinsToChange(TotalCoins){
      quarters = (int)(TotalCoins/25);
      TotalCoins %= 25;
      dimes = (int)(TotalCoins/10);
      TotalCoins %= 10;
      nickels = (int)(TotalCoins/5);
      TotalCoins %= 5;
      pennies = (int)(TotalCoins/1);
      TotalCoins %= 1;
  
      System.out.println("Quarters = " + quarters + "\nDimes = " + dimes + "\nNickels = " + nickels + "\nPennies = " + pennies);
      }
  }
      }
  </code></pre>
  
  <p>and this is my tester class: (im having problems calling the CoinsTotChange method.)</p>
  
  <pre><code>     import java.util.Scanner;
  
      public class CoinsTester {
      Coins money = new Coins();
      money.CoinsToChange(changeMoney);
      Scanner kybd = new Scanner(System.in);
      int changeMoney = kybd.nextInt();
  </code></pre>
  
  <p>}</p>