Let us try to develop an algorithm to compute and print the average of a set of data values.
2. Set the sum of the data values and the count to zero.
3. As long as the data values exist, add the next data value to the sum and add 1 to the count.
4. To compute the average, divide the sum by the count.
5. Display the average.