Question: C++ b.) (Lab1c.cpp) Write Lab1c.cpp in the following order. Define variables for storing the expense information of a week Define variables to hold the following

C++

b.) (Lab1c.cpp) Write Lab1c.cpp in the following order.

Define variables for storing the expense information of a week

Define variables to hold the following expenses: 45.25, 49.38, 12.75, 123.50, 8.25, 19.95, and 145.70.

Define variables to hold the days for the expenses. Define a variable to be used for holding the sum of the expenses. Define a variable to be used for holding the average of the expenses.

Analyze the information

Compute the total of these expenses using the variables holding the expenses and store the result in the variable for holding the sum of the expenses.

Compute the average of these expenses using the variables holding the expenses and store the result in the variable for holding the average of the expenses.

Create a report

Display the contents of the variables holding the expense information to the screen one expense per line. You must use those variables holding the expense days for the reporting code.

You must use meaningful names for the variables. For example, use weekDay1 for storing the expense day information Sunday.

In the output, all numbers must display properly. The decimal points of the expense amounts, the total, and the average are aligned vertically. The output should look exactly as follows.

C++ b.) (Lab1c.cpp) Write Lab1c.cpp in the following order. Define variables for

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!