Question: Using C++ Microsoft Visual Studio Need Task 4 This is my code on Task3 Task 2: Working with counter-controlled while loops (25 pts) Exercise 1.

Using C++
Microsoft Visual Studio
Need Task 4  Using C++ Microsoft Visual Studio Need Task 4 This is my
This is my code on Task3
code on Task3 Task 2: Working with counter-controlled while loops (25 pts)

Task 2: Working with counter-controlled while loops (25 pts) Exercise 1. Write an algorithm (pseudocode) to read a set of sales data items from standard input and calculate and output their total and their average. Prompt user to enter number of data items.. Exercise 2. Create a test data set to verify your algorithm. How many cases are needed? Explain Write your test data set below for submission to the EOL dropbox upon completion of your lab. Number of List data items tems Expected output Case 1: Exercise 3. Create a flowchart for your algorithm on Raptor and verify it using your test data Copy and paste your flowchart below for submission to the EOL dropbox upon completion of your lab.- Exercise 4. Write a C++ program that implements your flowchart. Use a do-while loop for input validation and a for loop to calculate the total (You may skip this exercise until we cover for and do-while loops) Demo your program to your instructor. Task 3: Working with sentinel-controlled loops (25 pts) Exercise 1. In the program of the previous task, we assumed the number of data items is known beforehand. Sometimes that's not the case. In those cases, instead of asking user for the number of data items, the program prompts the user to enter a sentinel as the last piece of data. Please refer to the textbook or class notes for the definition and use of sentinels. | Modify your program from the previous task so that the loop stops reading sales data when -1 is entered. Make sure to modify the prompt to inform the user to enter -1 when there are no more data items to enter. Demo your modified program for credit. Task 4: Working with files and end-of-file controlled loops (25 pts) Note: You may skip this task until we cover the section about using files for input/output Exercise 1. Modify your program from Task 3 so that sales data is read from a text file instead of being entered in the standard input device. Assume the data items are stored in the file separat by blank spaces and -1 is used as a sentinel. ed Exercise 2. Modify your program from Exercise 1 above to read the sales data until the end of the file (i.e. no sentinel is used). Demo your modified program for credit

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!