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 Answer
+ 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;
}