In C programming language: Suppose you own a beer distributorship that selld Pie
ID: 663495 • Letter: I
Question
In C programming language:
Suppose you own a beer distributorship that selld Piels (ID number 1), Coors (ID number 2), Bud (ID number 3), and Iron City (ID number 4) by the case. Write a 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 amout purchased (a positive integer value) or the amount sold (a negative integer value). Fo rnow you may assume that you always have sufficient foresight to prevent depletion of your inventory for any brand. (Hint: Your data should begin with four values representing the case inventory, followed by the transaction values.)
Explanation / Answer
#include<stdio.h>
#include<conio.h>
void main()
{int piels=0;
int coors = 0;
int bud=0;
int city=0;
GetCaseinventory(int brandid,double amount);
GetWeeklySales(int brandid, double amount);
GetFinalinventory(int brandid,double amount);
}
// Get the case inventory for each brand for the start of the week
int GetCaseinventory(int brandid,double amount)
{
printf("Case inventory for %d for start of the week is %d",brandid,amount ");
return 0;
}
//Process all weekly sales and purchase records for each brand.
int GetWeeklySales(int brandid,double amount)
{
printf("Weekly sales of %d brand is %d",brandid,amount ");
return 0;
}
//Display out the final inventory.
int GetFinalinventory(int brandid,double amount)
{
printf("The final inventory is %d",amount ");
return 0;
}