Computer Science, asked by garvchhabra4803, 10 days ago

To write a program and check whether it is a automorphic number or not


Answered by sofia147
In mathematics, an automorphic number is a number whose square "ends"in the same digits as the number itself. For example 5×5=25,6×6=36 and 76×76=5776 so, 5,6 and 7 are all automorphic numbers. I hope this is OK for you plz mark me as brainlist
Answered by BrainlyPromoter

Sample program to check whether the number entered by user is automorphic:

import java.util.*;

public class BrainlyPromoter


   public static void chapter()


       Scanner tp=new Scanner(;

       System.out.println("Enter a number that you want to check if its automorphic or not.");

       int n=tp.nextInt();

       int square=0, b=0, ct=1;


       int d=n;

       int l=n;






       for(int k=1;k<=b;k++)




       int dig=square%ct;



           System.out.println("Entered number is an automorphic number!");


       else    System.out.println("Entered number is not an automorphic number!");




Enter a number that you want to check if its automorphic.


Entered number is an automorphic number.

Similar questions