subject

Print either "Fruit", "Drink", or "Unknown" (followed by a newline) depending on the value of userItem. Print "Unknown" (followed by a newline) if the value of userItem does not match any of the defined options. For example, if userItem is GR_APPLES, output should be:

Fruit
#include

int main(void) {
enum GroceryItem {GR_APPLES, GR_BANANAS, GR_JUICE, GR_WATER};

enum GroceryItem userItem = GR_APPLES;

/* Your solution goes here */

return 0;
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 10:00
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
Match the file formats with the types of multimedia they can store
Answers: 2
question
Computers and Technology, 25.06.2019 08:10
What is the relation between information and data?
Answers: 3
question
Computers and Technology, 26.06.2019 06:50
Computers can be blank to communicate with other computers in the facility or even at (1 point) another facility. encrypted networked programmed encoded
Answers: 2
You know the right answer?
Print either "Fruit", "Drink", or "Unknown" (followed by a newline) depending on the value of userIt...
Questions
Questions on the website: 13722360