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
1
Answer:
It can be founded ok please try again
Similar questions
Math,
2 months ago
Computer Science,
2 months ago
Math,
5 months ago
India Languages,
5 months ago
English,
11 months ago
Hindi,
11 months ago