Answered step by step
Verified Expert Solution
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started