The code does not do what you think it does. This line:
while (cents <= 25);
{ ::: }
is equivalent to this:
while (cents <= 25)
{
;
}
{ ::: }
So that will iterate forever executing an empty-statement that never changes cents
. Fix it by removing the semicolon, and by reevaluating your logic.