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 > 25)
{
do
{
//subtract change
//add a coin
}
while (change >= 25);
}
if (//dime value)
{
do
{
//subtract value;
//add coins;
}
}
//do same thing for nickels and pennies
}
while (change > 0)