Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Find Factors of a Number using While Loop

print("Enter the Number: ")
num = input()

num = int(num)
print("
Factors of", num)

i = 1
while i<=num:
    if num%i==0:
        print(i)
    i = i+1
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Find #Factors #Number #While #Loop
ADD COMMENT
Topic
Name
4+8 =