Originally Posted by kamil77 Code: while (cents -= nickel) { cents -= nickel; coins++; } while (cents -= penny) { cents -= penny; coins++; } Think about your conditions in while loop....
while (cents -= nickel) { cents -= nickel; coins++; } while (cents -= penny) { cents -= penny; coins++; }