Question: Refer to the C++ code below to answer question: int main() { int company[2][6] = {{12000, 45000, 32000, 67000, 24000, 55000}, {10000, 56000, 42000, 23000,

Refer to the C++ code below to answer question:

int main() { int company[2][6] = {{12000, 45000, 32000, 67000, 24000, 55000}, {10000, 56000, 42000, 23000, 12000, 34000}}; int companySales = 0;

for (int location = 0; location < 2; location += 1) for (int month = 0; month < 6; month += 1) companySales += company[location][month]; // end for // end for

cout << "Company Sales: $" << companySales << endl; return 0; } ///////////////////////////////////////////////////////////////////

Detailed Question:

What value is stored in the company[1][5] element? How can you calculate the total company sales made in February? What is the highest row subscript in the company array? What is the highest column subscript in the array? If the January domestic sales are stored in the company[0][0] element, where are the January international sales stored? If you change the for clause in Line 18 to for (int month = 1; month <= 6; month += 1), how will the change affect the assignment statement in the for loop?

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!