Question: Develop the previous algorithm to get n numbers and calculate the average of them. Input: 1 . 1 . Prompt the user to enter the
Develop the previous algorithm to get numbers and calculate the average of them.
Input:
Prompt the user to enter the value of representing the number of values to be entered.
Initialize a variable 'count' to
Process:
a Loop for Input:
b Start a loop that continues until 'count' reaches
b Prompt the user to enter a value and store it in a new variable.
b Increment 'count' by
b Calculate the Sum:
b Add all numbers to get the sum.
b Store the result in a variable called sum.
c Calculate the Average:
c Divide the sum by the total number of values to get the average.
c Store the result in a variable called ave.
Output:
Display the calculated ave to the user.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
