Question: 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 "
 How to solve 251-UNIT 2-MONDAY-JULY 14-CLASSWORK 5-LOAD and PRINT and AVERAGE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!