Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to solve 2 5 1 - UNIT 2 - MONDAY - JULY 1 4 - CLASSWORK 5 - LOAD and PRINT and AVERAGE the

How to solve
251-UNIT 2-MONDAY-JULY 14-CLASSWORK 5-LOAD and PRINT and AVERAGE the VALUES of an Array.
No MULTIPLE TRANSACTIONS in this program.
Load the array illustrated below, the ROW that is GREY-IS NOT PART of the ARRAY DATA.
\table[[\table[[inventory],[number]],\table[[item],[description]],\table[[reorder],[point]],\table[[item],[cost]]],[1345,hammer,22,5.55],[1346,nails,1000,0.22],[2055,bolts,850,0.88],[1375,34 board,25,12.88],[2120,paint brush,500,8.99],[2250,drill,36,45.88]]
Use a "for loop" to
a. print all of the contents of this array
b. to get "SUMMARY AVG" OF
i. reorder point and
ii. item costs
Hints:
some examples of array initialization
string myFriends [2][3]=
{{"sally","100","0.2"}
{"bob","76","0.4"}
f;
The first row in an array is position number 0
The first column in an array is position number 0
Last row or column is ALWAYS equal to number of rows or number of columns MINUS 1
All values in an ARRAY.. MUST be declared as the SAME DATA TYPE
a. int, float or string
b. bool is possible for true and false
To convert EITHER a float or integer value to a string value
a. Use "to_string"
To convert an integer value to a string
a. Use "stoi"
To convert a float value to a string
a. Use "stof"
How to do a for / loop
for (int y=1;y19;y++)
cout " n y is now "
image text in transcribed

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

Advances In Databases And Information Systems Uropean Conference Adbis 2020 Lyon France August 25 27 2020 Proceedings Lncs 12245

Authors: Jerome Darmont ,Boris Novikov ,Robert Wrembel

1st Edition

3030548317, 978-3030548315

More Books

Students also viewed these Databases questions

Question

List out some inventory management techniques.

Answered: 1 week ago