Question: How to solve 2 5 1 - UNIT 2 - MONDAY - JULY 1 4 - CLASSWORK 5 - LOAD and PRINT and AVERAGE the
How to solve
UNIT MONDAYJULY CLASSWORK 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 GREYIS NOT PART of the ARRAY DATA.
tabletableinventorynumbertableitemdescriptiontablereorderpointtableitemcosthammer,nails,bolts, board,paint brush,drill,
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
sally
bob
f;
The first row in an array is position number
The first column in an array is position number
Last row or column is ALWAYS equal to number of rows or number of columns MINUS
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 tostring"
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 ;;
cout n is now
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
