(PP)write a program to accept a number from the user and count its number of divisors in python.
n=int(input("Enter an integer:"))
print("The divisors of the number are:")
for i in range(1,n+1):
if(n%i==0):
print(i)
n=int(input("Enter an integer:"))
print("The divisors of the number are:")
for i in range(1,n+1):
if(n%i==0):
print(i)
Comments
Post a Comment