Program to check whether a number is Automorphic number or not is discussed here. An automorphic number is a number whose square ends with the number itself.
For example, 5 is an automorphic number, 5*5 =25. The last digit is 5 which same as the given number. It has only a positive single digit number. If the number is not valid, it should display "Invalid input".
If it is an automorphic number display Automorphic Number else display Not Automorphic Number.
Input & Output format:
Input consist of an integer.
Sample Input :
Sample Output :
Not Automorphic Number
Program to check whether the number is automorphic or not is given below