write a program in java to accept a number and check whether ot is an automorphic number
Answers
Answered by
6
Answer:
A program to check whether a number is automorphic or not
Explanation:
class Automorphic
{
void number(int n)
{
int a,s,c=1;
a=n;
s=n*n;
while (n!=0)
{
c=c*10;
n=n/10;
}
if(s%c==a)
System.out.println(“Automorphic Number”);
else
System.out.println(“Not Automorphic Number”);
}
}
PLEASE RATE ME AS THE BRAINLIEST IF YOUR QUESTION IS ANSWERED WELL.
Similar questions