Answer:
The program is written using python
See explanation section for detailed explanation; as the program does not accommodate comments.
Program starts here
num = int(input("please enter a positive integer: "))
print("The factors of",num,"are:")
for i in range(1, num + 1):
if num % i == 0:
print(i)
Explanation:
This line prompts the user for input
num = int(input("please enter a positive integer: "))
This line prints a string literal which states the factors of the input number
print("The factors of",num,"are:")
The next line is a for statement that iterates all positive numbers from 1 till the inputted number
for i in range(1, num + 1):
This next line checks for the factors of the user input by checking for remainders.
if num % i == 0:
Lastly, the factors are printed
print(i)