Question

NOTE: you need to do either a flowchart or some sort of pseudo code for this. It is recommended that you do this BEFORE you s

write code in c++, run/load & provide output

0 0
Add a comment Improve this question Transcribed image text
Answer #1

//===========================================

#include<iostream>
using namespace std;

int main(){
int W[5][6]={
{-1,-1,-1,-1,-1,-1},
{-1,14,15,5,0,16},
{-1,15,20,25,0,5},
{-1,25,25,40,30,20},
{-1,5,3,10,0,10}};

cout<<" QUANTUM CORP"<<endl<<endl;
cout<<" ZERO STOCK REPORT"<<endl;
cout<<" 04/07/19"<<endl<<endl;
cout<<"\t\t\tstock#\tstock#\tstock#\tstock#\tstock#"<<endl;
cout<<"\t\t\t1\t2\t3\t4\t5\tTOTAL/WAREHOUSE"<<endl;
for(int i=1;i<=4;i++){
cout<<"WAREHOUSE "<<i<<"\t\t";
int sum=0;
for(int j=1;j<=5;j++){
cout<<W[i][j]<<"\t";
sum+=W[i][j];
}
cout<<sum<<endl;
}
cout<<endl;
cout<<"ITEM TOTALS \t\t";
for(int i=1;i<=5;i++){
int sum=0;
for(int j=1;j<=4;j++){
sum+=W[j][i];
}
cout<<sum<<"\t";
}
cout<<endl;
cout<<endl;
cout<<"ZERO STOCK ITEMS IN THREE OR MORE WAREHOUSES: ";
for(int i=1;i<=5;i++){
int count=0;
for(int j=1;j<=4;j++){
if(W[j][i]==0)
count++;
}
if(count>=3)
cout<<i;
}
cout<<endl<<endl<<endl;
//------------------------------------------------
cout<<" QUANTUM CORP"<<endl<<endl;
cout<<" LESS THAN TEN REPORT"<<endl<<endl;
cout<<" 04/07/19"<<endl;

cout<<"WAREHOUSE\t\t\t\t\tSTOCK ITEM"<<endl;
cout<<"NUMBER"<<endl<<endl;

int total=0,k;
for(int i=1;i<=4;i++){
k=0;
int S[5];
for(int j=1;j<=5;j++){
if(W[i][j]<10){
total++;
S[k]=j;
k++;
}
}
if(k>0){
cout<<i<<"\t\t\t\t\t\t";
for(int x=0;x<k;x++){
if(x==0)
cout<<S[x];
else
cout<<","<<S[x];
}
cout<<endl;
}

}

cout<<"TOTAL ITEM NUMBERS LESS THAN TEN: "<<total<<endl;;

return 0;

}

//=====================================================
OUTPUT:

Add a comment
Know the answer?
Add Answer to:
write code in c++, run/load & provide output NOTE: you need to do either a flowchart...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • write code in C++ or C, run/load and provide output Fast Flight Airlines is looking for a programmer. They are considering your applicatiorn for employment. As a test of your ability, they want yo...

    write code in C++ or C, run/load and provide output Fast Flight Airlines is looking for a programmer. They are considering your applicatiorn for employment. As a test of your ability, they want you to write the following program This program could be used in their operations with some modifications. Fast Flight Airlines is a specialized airline transport company. They will transport smokers as well as non-smokers on their airline. FOR fAST LIGHT aIRLINES NON SMOKING SECTION After you have...

  • The Code need to be in C# programming language. could you please leave some explanation notes...

    The Code need to be in C# programming language. could you please leave some explanation notes as much as you can? Thank you Create the following classes in the class library with following attributes: 1. Customer a. id number – customer’s id number b. name –the name of the customer c. address – address of the customer (use structs) d. telephone number – 10-digit phone number e. orders – collection (array) of orders Assume that there will be no more...

  • C++ Programming Help Please! NOTE: Please READ All Steps very carefully. DO #10! (10 is based...

    C++ Programming Help Please! NOTE: Please READ All Steps very carefully. DO #10! (10 is based off of 9). Program Info:   #9. Write a program that reads in ten whole numbers and that outputs the sum of all the numbers greater than zero, the sum of all the numbers less than zero (which will be a negative number or zero), and the sum of all the numbers, whether positive, negative, or zero. The user enters the ten numbers just once...

  • In C code 1. Write and submit the algorithm OR flowchart to indicate you understand the...

    In C code 1. Write and submit the algorithm OR flowchart to indicate you understand the problem 2. Create a project and name the source code lastname_firstname_prog5.c 3. Use the prog5.c as a guide, copy/ paste into your project source code *** build run and test, the outline code - You will need to declare an integer variable called again and initialize it 4. Add the function prototype and implement the function definition for the Greeting function 5. Add the...

  • Need help with this Java. I need help with the "to do" sections. Theres two parts...

    Need help with this Java. I need help with the "to do" sections. Theres two parts to this and I added the photos with the entire question Lab14 Part 1: 1) change the XXX to a number in the list, and YYY to a number // not in the list 2.code a call to linearSearch with the item number (XXX) // that is in the list; store the return in the variable result 3. change both XXX numbers to the...

  • 3 Programming Question (45 points) 3.1 Instructions You need to write the code by yourself. Your...

    3 Programming Question (45 points) 3.1 Instructions You need to write the code by yourself. Your implementation must use C/C++ and your code must run on the Linux machine general.asu.edu. Please refer to the programming guide (available under the Assignments folder on Blackboard) for using the general.asu.edu server, as well as compiling and running C/C++ code under Linux For this question, you need to provide a Makefile that compiles your program to an executable named a3 that runs on the...

  • Utilizing Menu Engineering Concept in a Restaurant Operation The purpose of this assignment is fo...

    Utilizing Menu Engineering Concept in a Restaurant Operation The purpose of this assignment is four fold: Step 1. To learn basic menu engineering principles Step 2. To learn menu engineering strategies Step 3. To use a spreadsheet program in generating two menu engineering reports Step 4. To evaluate the information found in the menu engineering reports using the menu engineering strategy model presented in this assignment. This will be accomplished by answering 9 questions found at the end of this...

  • Please only use c programming to solve this project. Feel free to ask anything, however, all...

    Please only use c programming to solve this project. Feel free to ask anything, however, all details have been provided so read the text carefully. Introduction Retail stores have been using cashier machines for almost a century to prepare bills in order to provide detail information to their customers about their purchase. In the past couple of decades, cashier machines have been replaced by computers and appropriate software known as Point of Sales (POS) with advanced capabilities varying from stock-taking...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT