A vending machine serves chips, fruit, nuts, juice, water, and coffee. The machine owner wants a daily report indicating what items sold that day. Given boolean values (1 or 0) indicating whether or not at least one of each item was sold, output a list for the owner. If all three snacks were sold, output "All snacks" instead of individual snacks. Likewise, output "All drinks" if appropriate. For coding simplicity, output a space after every item, even the last item.
//The code below is probably wrong, but this is all I have got.
int main() {
Your headed in the right direction but why are you returning 0 if you don't sell any chips? why would you want to end the program if you sell chips or fruit or nuts?
Start by removing all your else statements. So far you're good if they are not all ordered then the program does as you want but you need to figure out how if all the snacks are ordered to output "All snacks". Hint: You will be using nested if statements. The drinks are all the same idea as the snacks.