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

  • Migrating My Java Codebase to EE10
  • Smarter GitHub Copilot Prompts for Java Microservices: From APIs to Production Tests
  • Google Cloud Pub/Sub vs. AWS SNS and SQS: One Java API for Both With MultiCloudJ
  • Integration Testing With MongoDB in Java: Finding the @Sql Equivalent With Liquibase/Flyway or Jamolingo

Trending

  • Beyond the Wall of Charts: How Advanced Observability Displaced the Telemetry Dashboard
  • Testing Asynchronous Systems, Part 4: A Technique-by-Level Test Strategy
  • Idempotent Consumers: Preventing Stale Retries With Version-Fenced Writes
  • Building DynamoDB Streams Compatibility on Apache Phoenix

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Coding
  3. Java
  4. What is Automorphic number in Java ?

What is Automorphic number in Java ?

By 
Das Nic
·
Jul. 01, 15 · Interview
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
8.8K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

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

  • Migrating My Java Codebase to EE10
  • Smarter GitHub Copilot Prompts for Java Microservices: From APIs to Production Tests
  • Google Cloud Pub/Sub vs. AWS SNS and SQS: One Java API for Both With MultiCloudJ
  • Integration Testing With MongoDB in Java: Finding the @Sql Equivalent With Liquibase/Flyway or Jamolingo

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • 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