A program to check whether a number is an 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 consists of an integer.
Sample Input :
7
Sample Output :
Not Automorphic Number
The program to check whether the number is automorphic or not is given below
@@coding::1@@