Skip to content
This repository has been archived by the owner on Oct 23, 2018. It is now read-only.

Commit

Permalink
Merge pull request #1284 from aaliyah03/patch-1
Browse files Browse the repository at this point in the history
Merged by aniket965
  • Loading branch information
Aniket965 committed Oct 10, 2018
2 parents 6997deb + f73ae31 commit e81aa4a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Java/AutomorphicNumber
@@ -0,0 +1,23 @@
public class Automorph
{
public void Automorph(int n)
{
int c=0,p,k=0;c=0;
double r;
int m=n;
p=m*m;

while(n!=0)
{
k=n/10;
c=c+1;
n=k;
}
//return(c);
r=p%(Math.pow(10,c));
if(m==r)
System.out.println(m+ " is an automorphic number ");
else
System.out.println(m+ " is not an automorphic number ");
}
}

0 comments on commit e81aa4a

Please sign in to comment.