subject

The company array contains the amounts the company sold both domestically and internationally during the months of January through June. The first row contains the domestic sales for the six months. The second row contains the international sales during the same period. 1. What value is stored in the company[1][5] element?
2. How can you calculate the total company sales made in February?
3. What is the highest row subscript in the company array? What is the highest column subscript in the array?
4. If the January domestic sales are stored in the company[0][0] element, where are the January international sales stored?
5. If you change the for clause in Line 16 to for (int month = 1; month <= 6; month += 1), how will the change affect the assignment statement in the for loop?
6. Run the program. The total company sales are $643900.
7. Modify the program so that it displays the total domestic sales, total international sales, and total company sales. Save and then run the program. (The total domestic sales are $345500.) Take a print screen of the output screen and copy the code and paste bother here.
8. Next, modify the program so that it also displays the total sales made in each month. Save and then run the program. (The total January sales are $115000.) Take a print screen of the output screen and copy the code and paste bother here.
Program:
//Lab - calculates the total company sales
#include "stdafx. h"
#include
using namespace std;
int main()
{
int company[2][6] = { { 75000, 30200, 67800,
45000, 60000, 67500 },
{ 40000, 75000, 64000,
32600, 47800, 39000 } };
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;
}//end of main function

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Someone wishes to run the software on another computer system that runs an operating system that does not support the software what can he do
Answers: 3
question
Computers and Technology, 23.06.2019 14:00
How are stop motion special effects in animated films created
Answers: 1
question
Computers and Technology, 23.06.2019 19:50
Which feature is selected to practice and save the timing of a presentation
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Which task uses a simple parameter?
Answers: 1
You know the right answer?
The company array contains the amounts the company sold both domestically and internationally during...
Questions
question
Mathematics, 02.07.2021 20:30
Questions on the website: 13722363