Study the program shown below, and then answer the questions. 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 #include 2 using namespace std; 3 4 int main(). 5e { int company[2][6] {{75000, з0200, 67800, 45000, б0өөө, 67500)}, {40000, 75000, 64000, 32600, 47800, 39000}}; 10 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 12 13 14 15 16 17 18 cout <« "Company sales: $" « companySales « endl; return 0; 19 20 } //end of main function QUESTIONS 1. What value is stored in the company[ 1]I5]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[0I0] element, where are the January international sales stored? 5. If you change the for clause in Line 13 to for (int month = 1; month <= 6; month += 1), how will the change affect the assignment statement in the for loop? 67 O H N m ¢ n 67 00
Study the program shown below, and then answer the questions. 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 #include 2 using namespace std; 3 4 int main(). 5e { int company[2][6] {{75000, з0200, 67800, 45000, б0өөө, 67500)}, {40000, 75000, 64000, 32600, 47800, 39000}}; 10 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 12 13 14 15 16 17 18 cout <« "Company sales: $" « companySales « endl; return 0; 19 20 } //end of main function QUESTIONS 1. What value is stored in the company[ 1]I5]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[0I0] element, where are the January international sales stored? 5. If you change the for clause in Line 13 to for (int month = 1; month <= 6; month += 1), how will the change affect the assignment statement in the for loop? 67 O H N m ¢ n 67 00
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY