Python - WAP to Print the Divisor of any given Number in Python - 15
#!/usr/bin/python3 while True: num = int(input("Enter a Number : ")) reg = 0 print ("The Divisors are : ") for idx in range(1, num+1): if ( num % idx == 0): print (" " , idx) if (input("To Continue 'y' : ") == 'y' ): continue else: break
Post a Comment