Computers and Technology

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

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 12:30, Machuco127
Some of the first computer games were created in the early 1970s by college students experimenting after hours to see what the were capable of doing.
Answers: 3
image
Computers and Technology, 23.06.2019 15:30, Dweath50
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
image
Computers and Technology, 23.06.2019 21:30, maddietomlinson113
Examine the list below. which factors positively affect lifetime income? check all that apply.
Answers: 1
image
Computers and Technology, 24.06.2019 03:30, laylay120
Other - a written response, no less than arial 12-point font, to the following: of the following, which would you consider is most important to customer service goals? choose one and explain why. (1) accuracy (2) punctuality and attendance (3) courtesy (4) productivity (5) organization
Answers: 1
Do you know the correct answer?
The company array contains the amounts the company sold both domestically and internationally during...

Questions in other subjects:

Konu
History, 07.05.2021 17:10