Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The program should prompt the user to enter the numeric code on the fruit's sticker. Codes that are 4 digits long indicate that the fruit
- The program should prompt the user to enter the numeric code on the fruit's sticker.
- Codes that are 4 digits long indicate that the fruit has been grown conventionally.
- In this case, print the message: "Your fruit was grown conventionally, with the use of pesticides and chemicals."
- Codes that are 5 digits long, and start with an 8, indicate that the fruit has been genetically modified.
- In this case, print the message: "Your fruit was genetically modified."
- Codes that are 5 digits long, and start with a 9, indicate that the fruit was grown organically.
- In this case, print the message: "Your fruit was not genetically modified, and was grown according USDA organic standards."
- Additionally, your code should use exactly two sets of if-else statements for full credit (note that the use of else if is not allowed on this assignment).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started