0
C++ Vending Machine Change issue
https://code.sololearn.com/cT0ZGzNd41B8/?ref=app I’m having issues with the change part it keep on giving me lots of quarters why isn’t it giving me bills instead
1 Resposta
+ 1
The change-making if statements are missing braces.
One example:
if (moneyLeft >= 100)
hundred = moneyLeft / 100;
moneyLeft = moneyLeft % 100;
It should be:
if (moneyLeft >= 100)
{
hundred = moneyLeft / 100;
moneyLeft = moneyLeft % 100;
}