Python Program to input any number and check whether it is automatic or not
n=0
cnt=0
n=int(input('Enter any no...'))
sq=n**2
print(sq)
while(n>0):
cnt=cnt+1
n=n//10
no=sq%(10**cnt)
print(no)
if(n==no):
print('The no. is automorphic')
else:
print('The no. is not automorphic')
Comments
Post a Comment