Final answer:
The program reads integers and stores them in a list using a while loop until a non-positive number is encountered. It then prints out the list of positive integers.
Step-by-step explanation:
To write a program that reads a list of integers and outputs only those that are greater than zero, you need to collect user input and append it to a list as long as the input is positive. Using a while loop will allow the program to keep asking for input until a non-positive number is entered. After that, the program should print the list of positive integers.
Here's a Python program that accomplishes that task:
user_numbers = [] # Initialize an empty list
while True: # Start an infinite loop
user_input = int(input()) # Get integer input from the user
if user_input <= 0: # Check if the input is less than or equal to zero
break # Exit the loop
user_numbers.append(user_input) # Append the positive integer to the list
print(user_numbers) # Output the list of positive integers