Skip to content
Permalink
1cc8bfe294
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
17 lines (15 sloc) 532 Bytes
#A pronic number is a number which is the product of two consecutive integers, that is, a number of the form n
def pronic():
#inputs a number
number=int(input("enter a no"))
#initializes count to 0
count=0
#runs a loop to check whether its a pronic number
for i in range(0,number+1):
if(i*(i+1))==number:
count = 1
if count == 1:
print(str(number)+" "+"is a pronic number")
else:
print(str(number)+" "+"is not a pronic number")
pronic()