Question: Instructions: The provided C++ program demonstrates the use of an enumerated data type Day to represent weekdays. It should prompt the user to input sales

Instructions: The provided C++ program demonstrates the use of an enumerated data type Day to represent weekdays. It should prompt the user to input sales for five days and then calculates and displays the total sales. Prompt user for sales input Calculate total sales Display total sales Update the program to display the weekday names (e.g., "Monday" instead of 0). Modify the program to accept sales data for the entire week (Monday to Sunday). Add functionality to calculate and display the average daily sales. 4. Test the Program: Provide sample input and expected output, demonstrating the functionality of your modifications. 5. Submit Your Work: Provide a brief report summarizing your changes, including code snippets.

/1 This program demonstrates an enumerated data type in C++ #include #include // For setprecision and fixed using namespace std; // Define an enumerated type for days of the week int main( ) { // Constants const int NUM_DAYS = 5; // Number of days (Monday - Friday) // variables double sales [NUM_DAYS]; // Array to store sales data double total = 0.0; // Total sales accumulator Day workDay ; // Enumerator for Looping through days // Prompt user for sales input // calculate total sales // Display total sales return 0

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 Mathematics Questions!