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 result. Use a subprogram to input the numbers, a function to find the mean, and a subprogram to output the result.

In what language do you program, and could you post where you have a problem?

To solve this problem, you can follow these steps:

1. Create a subprogram to input the numbers:
- Declare an empty array to store the positive numbers.
- Keep accepting input from the user until they enter 0.
- Add each positive number to the array.
- Return the array to the main program.

2. Create a function to find the mean:
- Receive the array of positive numbers as a parameter.
- Calculate the sum of all the numbers in the array.
- Divide the sum by the total number of elements in the array to find the mean.
- Return the mean value.

3. Create a subprogram to output the result:
- Receive the mean value as a parameter.
- Print the mean on the console.

Here's an example implementation in Python:

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

def calculate_mean(numbers):
total = sum(numbers)
mean = total / len(numbers)
return mean

def output_result(mean):
print("Mean:", mean)

# Main program
numbers = input_numbers()
mean = calculate_mean(numbers)
output_result(mean)
```

You can run the above code and input your list of positive numbers (terminated by 0). The program will then calculate the mean of the numbers and output the result.