High School Physics

Automorphic Number Java Program – check if a Number is an Automorphic

This post presents a Java Program to check if a given Number is an Automorphic number.

Automorphic number Java Program – code

import java.util.Scanner;
public class Automorphic

public static void main(String args[])
Scanner sc = new Scanner(;
System.out.print(“Input a number : “);
int num = sc.nextInt();

int sq_num = num*num;
String str_num = Integer.toString(num);
String square = Integer.toString(sq_num);

System.out.println(“Automorphic Number.”);
System.out.println(“Not an Automorphic Number.”);

See also  Java program to find HCF (highest common factor) of 2 numbers
Scroll to top