Write a program to accept a number from the user and check whether it is a composite number or not.
A composite number has more than one factor( excluding 1 and the number itself)
Answers
Answered by
4
Answer:
class composite
{
void main(int n)
{
for(int i = 1; i<=n; i++)
if(n%i==0)
}
Sopln ("It is a composite no") ;
}}}
Similar questions