write a Java program to input a no. and find out the is automorphism no. or not
Answers
Answered by
1
class composite{
static void check(int a)//a is the number to be checked
{int n=0;//n is number of a’s factors
for(int i=1;i<=a;i++){
if(a%i==0)
n++;}
if(n>2)
System.out.println(a+” is a composite number”);
else
System.out.println(a+” is a prime number”);
}}
Hope this helps.
static void check(int a)//a is the number to be checked
{int n=0;//n is number of a’s factors
for(int i=1;i<=a;i++){
if(a%i==0)
n++;}
if(n>2)
System.out.println(a+” is a composite number”);
else
System.out.println(a+” is a prime number”);
}}
Hope this helps.
Answered by
0
you have a java program input rise the find out the java program
Similar questions