You are to write a program to produce an inventory report for alocal company. Yo
ID: 3619278 • Letter: Y
Question
You are to write a program to produce an inventory report for alocal company. Your input will be item name, item number,quantity, price per item, safe stock value. The followingshows which columns the input will be in:
itemname item number quantity price safe stock
20chars 5char 3char 6chars 3 chars
Output will be as follows:
item number itemname quantity price price*quantity %ofStock flag
You will put a symbol in the flag field it he inventoryquantity is less than the safe stock value.
This tells the company that they are getting too low on thisitem and need to build up the stock.
Print the report in sorted ordered, sorted on itemnumber.
Indicate the total value of the stock and the percentage of itemto the total stock values.
Indicate the percentage of total inventory value to the totalvalue of the highest single item in inventory. Print the itemand its information. (Print it again at the end of the table.)
Indicate the percentage of total inventory value to the totalvalue of the three least valued items combine. Print the threeitems and their information. ( I just need to see how much ofthe companies monies are tied up some of the inventory.)
You must use the struct data structure andfunctions.
Use ‘typedef’ for array declarations.
Explanation / Answer
please rate - thanks I've spent hours and hours on this, it's got problems, and this isthe first time I've given up, maybe you or someone else can figureout what's wrong with the input, probably I'm overlooking somethingreally really dumb. Only the 1st line of data is reading in correctly, all the othersate getting a new line after the item name, I can't figure outwhy but at least it will get you started #include #include #include using namespace std; struct inventory {char name[21]; int number; int quantity; double price; int safe; }; void sort(inventory[],int); int input(inventory[]); void print(inventory[],int); int main() {int count,i=0; inventory d[50]; count=input(d); for(i=0;iRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.