+ 7
How do you print out the first 100 prime number
Using java print out the first 100 prime number
7 Respostas
+ 12
check this java version i think you like!!
https://code.sololearn.com/c8KCZTNWXzC8/?ref=app
+ 23
https://code.sololearn.com/cLEax0HwxbvM/?ref=app
+ 17
make a method to check whether a number is prime or not ,
use an int variable a initialized by 1
run a loop starting from b=2;
while(a<=100){
boolean bol=checkPrime(b); b++;
if (bol) {System.out.println(b); a++;}
}
+ 9
@@eternity 1992
thanks for making my answer as best!!
😊😊
0
https://code.sololearn.com/cAS2IlD10qdf/?ref=app