Suppose you own a soft drink distributorship that sells Coca-Cola (ID number 1), Pepsi (ID number 2), Canada Dry (ID number 3), and Hires (ID number 4) by the case. Write a do-while loop program in c++ to do the following: read in the case inventory for each brand for the start of the week; b. process all weekly sales and purchase records for each brand; and
- Suppose you own a soft drink distributorship that sells Coca-Cola (ID number 1), Pepsi (ID number 2), Canada Dry (ID number 3), and Hires (ID number 4) by the case. Write a do-while loop program in c++ to do the following: read in the case inventory for each brand for the start of the week;
b. process all weekly sales and purchase records for each brand; and
c. display the final inventory. Each transaction will consist of two data items. The first item will be the brand identification number (an integer). The second will be the amount purchased (a positive integer value) or the amount sold (a negative integer value). The weekly inventory for each brand (for the start of the week) will also consist of two items: the identification and initial inventory for that brand. For now, you may assume that you always have sufficient foresight to prevent the depletion of your inventory for any brand. (Hint: Your data entry should begin with eight values representing the case inventory. These should be followed by the transaction values.)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images