Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE write a (((C language program)))! Suppose you own a beer distributorship that sells Piels (ID number 1), Coors (ID number 2), Bud (ID number

PLEASE write a (((C language program)))!
Suppose you own a beer distributorship that sells Piels (ID number 1), Coors (ID number 2), Bud (ID number 3), and Iron City (ID number 4) by the case. Write a complete C program to
a. Get the case inventory for each brand for the start of the week.
b. Process all weekly sales and purchase records for each brand.
c. Display out the final inventory.
Each transaction will consist of two data items. The first item will be the brand ID number (an integer). The second will be the amount purchased (a positive integer value) or the amount sold (a negative integer value). For now you may assume that you alway have sufficient foresight to prevent depletion of your inventory for any brand. (HINT: Your data entry should begin with four values representing the case inventory, followed by the transaction values.)
Find a flowchart attached to help you with this project.
image text in transcribed
START INV1 is the beginning inventory for beer type 1 (Piels) INPUT INV1, INV2, INV3, INV4 INPUT CODE Code is the beer type for the current transaction (1-4) OR-1(EOD) WHILE CODE != -1 body of the loop cxit PRINT INV1, INVZ, INV3, INPUT AMOUNT Amount is the amount of the current transaction The user should enter a positive number to represent purchasing cases of beer The user should enter a negative number to represent selling cases of beer INV4 CODE 1 TRUE INV1 = INV1 + AMOUNT STOP FALSE TRUE INV2 = INV2 + AMOUNT CODE = 2 FALSE INV3 = INV3+ AMOUNT TRUE CODE == 3 FALSE INV4 = INV4 + AMOUNT INPUT CODE Code is the beer type for the current transaction (1-4) OR-1(EOD) The amount will be entered (as long as code is not the EOD) at the top of the loop

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions

Question

Factor the trinomial. x 2 - 2x - 63

Answered: 1 week ago

Question

1. What is Ebola ? 2.Heart is a muscle? 3. Artificial lighting?

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago