Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Exercise 1. Write an algorithm (pseudocode) to read a set of sales data items fr

ID: 3685564 • Letter: E

Question

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 items List data items 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)

Explanation / Answer

1....

Algorithm:

Begin

Take sales data items input by using array

Using for loop find sum of the all the sales data items.

sum+=num[i];

Find the average by using

avg=sum/n;

Print sum

Print Avg

End