JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
An automorphic number is one that is contained in the end of its square.
Like 5²=25 and the last digit is 5.
25²=625,
and it goes on.
Hope you like the code.
This code prints Automorphic numbers upto a particular limit...
*/
import java.util.*;
public class automorphic
{
public static void main(String[] args)
{
int m,n,a,d,f,i;
Scanner in= new Scanner(System.in);
try{
i=in.nextInt();
}catch(Exception e){
System.out.println("Wanna Crash me huh\n\nYou have failed in your mission.\n\nNow, enter a Number.\n\nBut to give you an example of what I can do...\n");
i=1000;
}
for(n=1;n<=i;n++)
{
d=0;
a=n*n;
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run