Math, asked by amritasingh6, 1 year ago

wap to input a number and display whether number is automorphic number or not please write in such a way so that is easy to understand . will mark u as a brainliest

Answers

Answered by GOZMIt
2
heya.....


In mathematics, an automorphic 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

Input a number : 76 Automorphic Number.


tysm..#gozmit

HarshitMestry123: lol
HarshitMestry123: where is the program
amritasingh6: no prblm
amritasingh6: thnks to both
Answered by HarshitMestry123
2
bluej

import java.util.*;
class Automorphic number
{
public static void main()
{
Scanner sc=new Scanner(System.in);
int n,d;
double sq;
System.out.println("Enter a number:");
n=sc.nextInt();
sq=n*n;
while(sq<0)
{
d=sq%10;
sq=sq/10;
if(d==n)
break;
else
System.out.println("Not an Automorphic number");
}
System.out.println("Automorphic number");
}
}





HarshitMestry123: Hope it is correct
amritasingh6: sorry I was trying to make you a brilliant by mistake I made sorry
HarshitMestry123: ???
HarshitMestry123: i don't understand?
HarshitMestry123: but why didn't you give me brainliest
HarshitMestry123: ok whatever, i hope the solution is correct
Similar questions