#Program to calculate the factor and to find prime number
a=int(input('enter the number'))
r=a
p=0
print(' ',float(a))
for i in range(2,500):
while(a%i==0):
a=a/i
print(i,'x',a)
p=p+1
if(a==1):
print('Total factors of',r,'is',p)
if(p==1):
print(r,'is a prime number')
else:
print(r,'is not a prime number ')
OUTPUT:
Comments
Post a Comment
THANK YOU FOR COMMENTING !
PLEASE SUBSCRIBE TO OUR WEBSITE FOR LATEST UPDATES