I'm assuming Java, but if you need a different language, it shouldn't be too hard to transcribe.
public void toCoins(int totalChange) {
int[] coins = new int[5] //array of coin counts
int[] values = new int[]{100, 25, 10, 5, 1}
String[] singular = new String[]{"dollar", "quarter", "dime", "nickel", "penny"};
String[] plural = new String[]{"dollars", "quarters", "dimes", "nickels", "pennies"};
for(int i = 0; i < 5; I++) {
while(totalChange > values[i]) {
totalChange -= values[i];
coins[i]++;
}
}
for(int i = 0; i < 5; i++) {
if(coins[i] == 1) System.out.println("1 " + singular[i]);
else if(coins[i] > 1) System.out.println(coins[i] + " " + plural[I]);
}