write a java program to input a number and check whether it is a prime number or not
Answers
Answered by
2
Explanation:
{int n=integer.parseIbt....
for (int i=1;i<n;i++)
if (n%i==0)
{sopln("composite")
break;}
elseif (n <=1){sopln("negative")}
else{sopln("0")}}
Similar questions