So my teacher gave me this as part of an assignment. I get that he wants us to make an algorithm, but I don't understand of what.
This is the exercise:
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.
I would greatly appreciate if someone explained this to me since its due today.
psuedo code he means english statements of what to do. for example if you were read and display contents from a file you would 1. Open file 2. read from file 3. Close File 4. Print contents
You may want to be more detailed than what i wrote though
the algorithm is in psuedo code. Youre not writing actual code. You are writing in english the steps you would take (in order) to accomplish what your professor is asking.
Reading a set of sales data means you are reading data from a file and then you will use the data you got from the file to calculate the total and average.
@ furry guy yes you are correct but i didnt want to give up the entire solution. I just wanted to give an example. I can see how my statements could be misleading. Thats my mistake!