Asked by Jake
public class PrimeNumbers {
public static void main(String[] args) {
int x = 100;
for(int i=2; i <= x; i++) {
if(i%2==0)
System.out.println("notprime");
System.out.println(i) ;
if(i%1==1)
System.out.println("prime");
}
}
Answers
Answered by
Jake
The assignment is to list all prime numbers up to 100 in java. Thanks
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.