import java.util.Scanner;
class AutomorphBuzz
{
public static void main()
{
Scanner kb=new Scanner(System.in);
System.out.println(“Enter a number to check whether a number is an Automorphic or a Buzz number”);
int a=kb.nextInt();
System.out.println(“Enter 1 for Automorphic Number and Enter 2 for Buzz Number”);
int x=kb.nextInt();
int b=a*a;int c=b%100;int d=b%10;int e=a%7;int f=a%10;
if(x==1)
{ if(a<10)
{ if(d==a) System.out.println("The number is Automorphic");
else
System.out.println("The number is not Automorphic"); }
else
System.out.println();
if(b>100)
{ if(c==a) System.out.println("The number is a Automorphic number");
else
System.out.println("The number is not a Automorphic number"); if(b<100)
{ if(d==a) System.out.println("The number is a Automorphic number");
else
System.out.println("The number is not a Automorphic number");
}
}
}
else if(x==2)
{ String g=(e==0||f==7)?"The number is a Buzz number":"The number is not a Buzz number"; System.out.println(g); }
else
System.out.println("Invalid input"); }
}
Making money as a coder in 2025 is not much of a big or tough…
Lloyds Technology Centre, A tech and data company located in Hyderabad, India. They are part of…
How to Increase Height at Any Age Rise Above: How to Increase Height at Any…
In the fast-paced digital world, we often forget the timeless beauty that nature offers. Today,…
Top 10 Deadliest Kicks in Martial Arts: Master the Art of Knockouts Martial arts is…
How to Optimize Battery Life of Your Smartphone: Tips and Tricks for Prolonging Battery Health…