Hello there, I need some help in understanding this. Im not that great in C programming and would appreciate some assistance. This is the question :
Design an algorithm using flowchart or pseudocode to prompt the user for a series of positive integer values. Calculate the average of these values and display the average at the end of the program. Assume that the user types the sentinel value -1 to indicate “end of data entry.”
Sample input-output:
Enter a positive integer (-1 to end) : 5
Enter a positive integer (-1 to end) : 7
Enter a positive integer (-1 to end) : 6
Enter a positive integer (-1 to end) : -1
The average value is: 6
I searched online and found out this solution however it is only for three numbers.Is there any way of modifying this to include the sum of x numbers / number of x(integers) to find the average? Please help. Thanks.