Question: 5) (20 points) While loop: Modify your grocery bag program to have the user continue to enter their # of items until they enter a

5) (20 points) While loop: Modify your grocery bag program to have the user continue to enter their # of items until they enter a -1. This should be thought of as individual customers - each entering their number of groceries, getting a response for the number of bags that they need, and then moving on to the next customer. Meaning - you should NOT be accumulating the total number of groceries. Each customer is separate! Check for other out of bounds entries - if the user enters a number less than-1 or greater than 99, ask them to enter a new number of items. If a -1 is entered, end the program. This task can lead to frustration in terms of getting everything right. Think through the logic - get close - but, don't spend so much time on this that you sacrifice other tasks. This is a program that would definitely benefit from planning - perhaps draw a flowchart, NON-PROGRAMMING CONTENT 1) 02 points) Relational operators and logical operators: Determine whether the express below will be true or false 4. 3Z) && !( 2) cout
Step by Step Solution
There are 3 Steps involved in it
Our experts were unable to provide an answer due to incomplete information or other limitations Howe... View full answer
Get step-by-step solutions from verified subject matter experts
