Question: Follow the instructions for starting C++ and viewing the ModifyThis18.cpp file, which is contained in either the Cpp8Chap12ModifyThis18 Project folder or the Cpp8Chap12 folder. (Depending
Follow the instructions for starting C++ and viewing the ModifyThis18.cpp file, which is contained in either the Cpp8\Chap12\ModifyThis18 Project folder or the Cpp8\Chap12 folder. (Depending on your C++ development tool, you may need to open the project/ solution file first.) The file contains the code shown earlier in Figure 12-8. The first column in the array contains the sales amounts for paperback books sold in each of the three stores; the second column contains the sales amounts for hardcover books. Jenko Booksellers has opened another store. The store’s sales of paperback and hardcover books are $1650.85 and $1246.85, respectively. Add the new sales information to the array, and then modify the program appropriately. Save and then run the program.
![1 //Jenko Booksellers.cpp - displays the total sales 2 //Created/revised by on 3 4 #include 5 #include 6 using namespace std; 8 int main() 9 { double sales [3] [2] 11 10 {{3567.85, 2589.99},- {3239.67, 2785.55}, {1530.50, 1445.80}};- //accumulator array declaration 12 13 double total =](https://dsd5zvtm8ll6.cloudfront.net/si.question.images/images/question_images/1598/0/0/1/5305f3f917a5e79f1598001520998.jpg)
1 //Jenko Booksellers.cpp - displays the total sales 2 //Created/revised by on 3 4 #include 5 #include 6 using namespace std; 8 int main() 9 { double sales [3] [2] 11 10 {{3567.85, 2589.99},- {3239.67, 2785.55}, {1530.50, 1445.80}};- //accumulator array declaration 12 13 double total = 0.0; 14 15 //accumulate sales for (int store = 0; store < 3; store += 1) for (int book = 0; book < 2; book += 1) total +- sales[store] [book]; //end for //end for. 16 17 18 19 accumulates the sales stored in the array 20 21 cout
Step by Step Solution
3.37 Rating (172 Votes )
There are 3 Steps involved in it
include include using namespace std int main double sales42 356785 258999 323967 278555 1530... View full answer
Get step-by-step solutions from verified subject matter experts
