# Python Program to find the factors of a number
# This function computes the factor of the argument passed
def print_factors(x):
print("The factors of",x,"are:")
for i in range(1, x + 1):
if x % i == 0:
print(i)
num=int(input("Enter a Number to find the Fators : "))
print_factors(num)
#clcoding.com
Enter a Number to find the Fators : 26 The factors of 26 are: 1 2 13 26
0 Comments:
Post a Comment