Input a list of positive numbers (terminated by 0) into an array find the mean (average) of the numbers in the array and output the results. Use a subprogram to input the numbers, a function to find the mean and a subprogram to output the results

Can you post your pseudocode or your code, and specify where you need help?

To solve this task, we can use the following steps and create three separate subprograms:

1. Subprogram to input the numbers:
- Create an empty array to store the numbers.
- Start a loop that will continue until the user enters 0.
- Prompt the user to enter a positive number.
- Read the input from the user.
- If the number is positive (greater than 0), append it to the array.
- Repeat the above steps until the user enters 0.
- Return the array of positive numbers.

2. Function to calculate the mean:
- Accept the array of positive numbers as an input parameter.
- Initialize a variable called "sum" to 0 to keep track of the sum of all numbers.
- Iterate over each number in the array using a loop.
- Add each number to the sum.
- After iterating through all numbers, divide the sum by the length of the array to calculate the mean.
- Return the mean value.

3. Subprogram to output the results:
- Accept the mean value as an input parameter.
- Print the mean value to the console or any desired output method.

Here's an example implementation in Python:

```python
def input_numbers():
numbers = []
while True:
num = int(input("Enter a positive number (enter 0 to terminate): "))
if num == 0:
break
elif num > 0:
numbers.append(num)
return numbers

def calculate_mean(numbers):
if len(numbers) == 0:
return 0
total_sum = sum(numbers)
mean = total_sum / len(numbers)
return mean

def output_results(mean):
print("The mean of the numbers is:", mean)

# Main program flow
numbers_list = input_numbers()
mean_value = calculate_mean(numbers_list)
output_results(mean_value)
```

Please note that this implementation assumes you are using Python, but you can adapt the logic to any programming language of your choice.