Computer Science, asked by ivannamerisa, 5 months ago

Why is it that when i try to enter an input in the following constructor program, it says that symbol cannot be found?
import java.io.*;
class Prime
{
int n;
Prime()
{
n=0;
}
void input(int x)
{
n=x;
}
void display()
{
int i,c=0;
for(i=1;i<=n;i++)
{
if(n%i==0)
c++;
}
if(c==2)
System.out.println(n+"It is a prime number");
else
System.out.println("It is not a prie number");
}
}

Answers

Answered by sarthak13597
1

Answer:

It can be founded ok please try again

Similar questions