#include <stdio.h>
int automorphic(int num){
    int square = num * num;
    while(num != 0)  {  
        if(num % 10 != square % 10){
            return 0;
        }
        num /= 10;
        square /= 10;
    }
    return 1;
}
int main ()
{
    int num;
    scanf("%d",&num);
    int square = num * num ;
    if(automorphic(num))
        printf("Num : %d is Automorphic Number",num);
    else
        printf("Num : %d is Not Automorphic Number",num);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: