You need to subtract the value of the quarter every time the if loop is executed. You also don't really need int leftover. This is what you should try to follow:
do
{
if (//change >is 25more than a quarter)
{
do
{
//subtract change
//add a coin
}
while (change >= 25);
}
if (//dime value)
{
do
{
//subtract value;
//add coins;
}
while(//change is between dime and quarter);
}
//do same thing for nickels and pennies
}
while (change > 0)