|
|
switch
the entered variable (same could be done with multiple if else statements). For each case ask "How much ... do you want", get the number into a seperate variable, then check if the user has money for it. If he does, subtract amount*price from money and add amount to lemons, cups, sugar or ice.