Home Answers Viewqa Java-Beginners Java Automorphic number program

 
 


rajnish
Java Automorphic number program
2 Answer(s)      4 years and a month ago
Posted in : Java Beginners

View Answers

June 13, 2009 at 4:21 PM


Hi Friend,

Try the following code:

import java.math.*;
import java.util.*;
class AutomorphicNumber{
static int d=10;
public static void main(String args[]){
System.out.print("Enter any number :");
Scanner input=new Scanner(System.in);
int n=input.nextInt();
if(d>=n){
if ((n*n) % d == n){
System.out.println("Automorphic Number");
}
else{
System.out.println("Not Automorphic Number");
}
}
else if(d<=n){
d=d*10;
if ((n*n) %d==n){
System.out.println("Automorphic Number");
}
else{
System.out.println("not an automorphic number");
}
}
}
}

Thanks

January 13, 2011 at 11:37 AM


Write a Program in java to find the all automorphic no's from 10 to 1000?









Related Pages:
automorphic no
automorphic no  write a program in java to find all the automorphic no's from 10 to 1000
Java Automorphic number program - Java Beginners
Java Automorphic number program  Write a program to read a positive...){ if ((n*n) % d == n){ System.out.println("Automorphic Number"); } else{ System.out.println("Not Automorphic Number
How to Check Automorphic Number using Java Program
How to Check Automorphic Number using Java Program Automorphic numbers... whose square ends with the given integer. For example,5 is an automorphic number.... Similarly 6 is an automorphic number as the square of 6 is 36 and its square consists
automorphic numbers
automorphic numbers  how to find automorphic number in java   Hi Friend, Pleas visit the following link: Automorphic numbers Thanks
Java Find Automorphic numbers
Java Find Automorphic numbers In this section, you will learn how to find... square ends with the given integer. For example,5 is an automorphic number... is an automorphic number as the square of 6 is 36 and its square consists
Magic number Java Program
Magic number Java Program  write a program that guesses what number the user is thinking of. Below is a sample transcript: Think of a number between 1 and 255. I will guess the number you are thinking of. 1 3 5 7 9 11 13 15 17
program on factorial of a given number in java
program on factorial of a given number in java  please tell me, how to write program on factorial of a given number in java
program on factorial of a given number in java
program on factorial of a given number in java  please tell me, how to write program on factorial of a given number in java
Prime Number program in Java
Prime Number program in Java will print the prime numbers between 1 to any given number. Prime Number is a number that is not divisible by any number other... program in Java: package Tutorial; public class PrimeNumber { public static
Prime number program in java
Prime number program in java In this example you will learn how to write a program to generate and check  prime number  in java. As we know prime number are those number which are divisible by 1 or itself, first define
prime number
prime number  HI!I want a java program that accepts a number from user and displays whether it is a prime number or not using BufferedReader
java program to check whether a number is pallindrome or not using recursion???????
java program to check whether a number is pallindrome or not using recursion???????  java program to check whether a number is pallindrome or not using recursion
java program to check whether a number is pallindrome or not using recursion???????
java program to check whether a number is pallindrome or not using recursion???????  java program to check whether a number is pallindrome or not using recursion
java program to check whether a number is pallindrome or not using recursion???????
java program to check whether a number is pallindrome or not using recursion???????  java program to check whether a number is pallindrome or not using recursion
java program to check whether a number is pallindrome or not using recursion???????
java program to check whether a number is pallindrome or not using recursion???????  java program to check whether a number is pallindrome or not using recursion
java program to check whether a number is pallindrome or not using recursion???????
java program to check whether a number is pallindrome or not using recursion???????  java program to check whether a number is pallindrome or not using recursion
java program to check whether a number is pallindrome or not using recursion???????
java program to check whether a number is pallindrome or not using recursion???????  java program to check whether a number is pallindrome or not using recursion
java program to check whether a number is pallindrome or not using recursion???????
java program to check whether a number is pallindrome or not using recursion???????  java program to check whether a number is pallindrome or not using recursion
Check Perfect Number in Java Program
How to Check Perfect Number in Java Program A perfect number is a positive... to the number itself. For example 6 is a perfect number as 1,2 and3 are its divisors and the sum of divisors=1+2+3=6. Here we have created a program that will take
java program to insert data into a file and count the number of words from the file???????
java program to insert data into a file and count the number of words from the file???????  java program to insert data into a file and count the number of words from the file
number of stairs - Java Beginners
number of stairs  1. Write a program that prints an n-level stair case made of text. The user should choose the text character and the number...(); } } } ----------------------------------- read for more information, http://www.roseindia.net/java/master
Magic number in java
Magic number in java  Hi.. Can any one tel how to watch a magic number of a program?   import java.util.*; class MagicNumber...); System.out.print("Enter the number: "); int num =input.nextInt(); int b=0,x
Number Convert - Java Beginners
Number Convert  Dear Deepak Sir, I am entered in Command prompt... Only.Plz send me the program ASAP. Thanks & Regards, VijayaBabu.M  Hi... passString(int number){ int num, q ; if (number < 10 ){ displayOutput(a[number
The Array Palindrome Number in Java
The Array Palindrome Number in Java       This is a Java simple palindrome number program... program. The array palindrome number arrange the array number. This session
ID number program
ID number program  hi can anyone help me with the following program. a program that can determine a person,s date of birth, age, gender and citizenship by just entering the id number. thanks in advance
java - Java Beginners
java  Write a Java program to read a positive integer from console and find out whether it is automorphic or not.(Automorphic number are those which...){ if ((n*n) % d == n){ System.out.println("Automorphic Number"); } else
a Java program
a Java program    Write a Java program to print even numbers from 2 to 1024? Write a Java program to print ? My Name is Mirza? 100 times? Write a Java program to print Fibonacci Series? Write a Java program to reverse a number
Write a program to calculate factorial of any given number
program to calculate factorial of any given number. First of all define a class... in java. Here is the code of program: import ... Factorial Examples - Java Factorial Example to calculate factorial of any
guess number - Java Interview Questions
guess number  i am doing a java program for user to guess number. i need to include Math.abs in the program. my code is: import...) { input=JOptionPane.showInputDialog("Invalid number!Please re-enter
java program
java program  . Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any type of numeric values and returns the results
Java program
Java program  Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any type of numeric values and returns the results
Prime Number in Java
Prime Number in Java       This Java programming tutorial will be read how to get prime number. First of all we will define a class "Prime Number". Java I/O package
java program
java program  write a program that accepts only 3 integer values as command line arguments.print the values enter by the user. handle ArrayIndexOutofbounds exception and number format exception by providing appropriate message
java program
java program  enter any number and print the number's digits in words. example(enter 123) the output comes(one two three
java program
java program  Write a program that computes loan payments. The loan can be a car loan, a student loan, or a home mortgage loan. The program lets the user enter the interest rate, number of years, loan amount, and displays
Prime Number in Java
Prime Number in Java       This Java programming tutorial, we will be read how to get prime number... in this program we use two 'for' loop. For loop will start from 1 to entered number
java program
java program  Given a string and a number n, find the n th distinct repeating character
Java program
Java program  Write a Java program that takes 3 integer numbers from command line and display maximum number. (Use conditional operator)   Java display maximum number using conditional operator: import java.util.
Palindrome Number Example in Java
Palindrome Number Example in Java    ... the palindrome number and how to determine any number is palindrome or not. First of all we are going to read about the palindrome number.  This is the number
Two Element Dividing Number
Dividing Two Numbers in Java       This is very simple java program. In this section we will learn how to divide any two number. In java program use the class package
a java program
a java program  Write a java program that accepts positive numbers... values in great detail) is any negative number)   hi friend, Please go through the link may, this will be helpful for you http://www.roseindia.net/java
java program
java program  Please help me to write a Java program that ask a user to enter his/her name ,surname and then ask how many Item he/she want to buy using loop according number of item also ask name of item and price(double
java program
java program  Please help me to write a Java program that ask a user to enter his/her name ,surname and then ask how many Item he / she want to buy using loop according number of item also ask name of item and price(double
write a java program to print marklist of "n " students. input Register number, name and marks of three subjects.
write a java program to print marklist of "n " students. input Register number, name and marks of three subjects.  write a java program to print marklist of "n " students. input Register number, name and marks of three subjects
java program
java program  A user will input a sequence of positive integers ending with a sentinel -1. write a while loop hat counts the number of even an dodd..., the program should print out 1 8 10 10 EVEN:1 ODD:3
Java Program - Java Beginners
Java Program  Write a java program to find out the sum of n-number of digits of a given number by the user
JAVA program - Java Beginners
JAVA program  Write a JAVA program to accept a number and find whether it is a magic number
JAVA program - Java Beginners
JAVA program  Write a JAVA program to accept a number and find whether it is a magic number
Java Program
Java Program  Implement a public java method which takes two parameters of type 'Integer'. If the values of the parameters are equal, it should return boolean true. Else it should return boolean false. Use minimum number
java program
java program  Problem 1 Write a javaScript program that would input Employee Name, rate per hour, No. of hours worked and will compute the daily wage of an employee. If the number of hours worked exceeds eight hours 30% to each