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 21:30
Elements such as fonts colors visual structure graphics and the interface of a web page should complement each other to ensure blank
Answers: 3
question
Computers and Technology, 23.06.2019 00:10
Write a function so that the main0 code below can be replaced by the simpler code that calls function mphandminutes tomiles0. original main0 int main) l double milesperhour-70.0; double minutestraveled = 100.0; double hourstraveled; double milestraveled; hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; cout < "miles" 2 using namespace std; 4 /* your solution goes here/ 6 int maino 1 test passed 7 double milesperhour 70.0 all tests passed 8 double minutestraveled 100.0; 10 cout < < "miles: " < < mphandminutestomiles(milesper-hour, minutestraveled) < < endl; 12 return 0; 13
Answers: 1
question
Computers and Technology, 24.06.2019 11:20
William travels a lot on business purpose. he needs to regularly communicate with his business partner. he also needs to send out weekly reports to his boss while he is traveling. which web-based application best suits william’s needs? (social media, webmail, wiki) is the best web-based application for william. he can access this application via the internet using a (digital cable, fax machine, web browser).
Answers: 1
question
Computers and Technology, 25.06.2019 04:30
Which relativos possible when two tables share the same primary key? a.) one-to-one b.) one-to-many c.) many-to-one d.) many-to-many
Answers: 2
You know the right answer?
The company array contains the amounts the company sold both domestically and internationally during...
Questions
question
Mathematics, 30.06.2019 00:40
question
English, 30.06.2019 00:40
Questions on the website: 13722359