Question: Requirement: Using C++ programing fit 1) (20 points) If Statement. This task is intended to help out at the checkout of a grocery store. Ask

 Requirement: Using C++ programing fit 1) (20 points) If Statement. This

Requirement: Using C++ programing

fit 1) (20 points) If Statement. This task is intended to help out at the checkout of a grocery store. Ask the user to enter the number of grocery items that they purchased. Assume 8 items can per bag (regardless of the size of the items). Calculate the number of bags needed. In this calculation, you should also assume that all items must end up in a bag. So, if a user has 9 items, they need 2 bags (8 in the first and an extra bag for the one additional item). Use an if statement to display one of two grammatically correct statements indicating how many bags are needed: You only need one bag. or You need bags. For now, you can assume that the user always enters a positive number. Note: You will likely need a second if statement to determine if there are remainder items and, if so, increment the number of bags that you calculated

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!