DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Building High-Performance Time-Series Applications With Java and QuestDB
  • Building IoT Time-Series Applications With Java and Apache IoTDB
  • Building Time-Series Applications With Java and InfluxDB
  • Embabel vs LangGraph4j: Two Agentic Philosophies for Investment and Risk Analysis in BFSI

Trending

  • AI on Top of a Dysfunctional System
  • Nobody Designs an RBAC Mess; Everyone Ends Up With One
  • The Silent Container Death: A TCP Dial That Never Times Out
  • Six Degrees of Ayrton Senna: Learn Neo4j by Connecting 75 Years of Formula 1
  1. DZone
  2. Coding
  3. Java
  4. What is Automorphic number in Java ?

What is Automorphic number in Java ?

By 
Das Nic user avatar
Das Nic
·
Jul. 01, 15 · Interview
Likes (0)
Comment
Save
Tweet
Share
8.7K Views

Join the DZone community and get the full member experience.

Join For Free

In mathematics an automorphic number (sometimes referred to as a circular number) is a number whose square "ends" in the same digits as the number itself. 

For example, 

52 = 25, 

62 = 36,

762 = 5776, 

and 8906252 = 793212890625, 

so 5, 6, 76 and 890625 are all automorphic numbers.

And the logic behind :

int n=56;
        int d=1; int i;
        for(i=n;i>0;i=i/10)
        {
            d=d*10;
        }
        if((n*n)%d==n)
        {
            System.out.println(n+"\t"+"is Automorphic Number");
        }
        else
        {
             System.out.println(n+"\t"+"is not Automorphic Number");
            }
        }
You can check full article from Geek On Java - Hub for Java and Android 
Java (programming language)

Opinions expressed by DZone contributors are their own.

Related

  • Building High-Performance Time-Series Applications With Java and QuestDB
  • Building IoT Time-Series Applications With Java and Apache IoTDB
  • Building Time-Series Applications With Java and InfluxDB
  • Embabel vs LangGraph4j: Two Agentic Philosophies for Investment and Risk Analysis in BFSI

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook