In: Computer Science
[15 marks] Draw the flowchart of the following programming problem: You can draw the flowchart using a drawing tool, or draw the flowchart on a piece of paper, take a picture, insert it here or save it in the submission folder The program reads an unspecified number of integers until a zero is entered. While the program reads each number it counts the number of positive numbers and the number of negative numbers that have been entered and sum up the values of the numbers entered. After the user enters zero, the program computes the average of the input values, not counting the zero. At the end the program displays the average, and the counts of positive numbers and negative numbers
Here is the flowchart for the above problem. It is created using Flowgorithm.
NOTE:
n is the total number of numbers entered by the user, sum and avg are the variables used to store the sum and the avg, respectively. Also, the while loop terminates when the user enters 0, until when it keeps count of all the negative numbers entered and the positive numbers entered. At the end of the loop, we display the results.
Here is a working example for the same: