+ 7

How do you print out the first 100 prime number

Using java print out the first 100 prime number

30th Jan 2018, 3:47 PM
eternity 1992
eternity 1992 - avatar
7 odpowiedzi
+ 12
check this java version i think you like!! https://code.sololearn.com/c8KCZTNWXzC8/?ref=app
15th Feb 2018, 6:46 PM
ASIF BILAKHIYA
ASIF BILAKHIYA - avatar
+ 23
https://code.sololearn.com/cLEax0HwxbvM/?ref=app
26th Feb 2018, 7:04 AM
Danijel Ivanović
Danijel Ivanović - avatar
26th Feb 2018, 7:02 AM
Danijel Ivanović
Danijel Ivanović - avatar
+ 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++;} }
30th Jan 2018, 3:53 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 9
@@eternity 1992 thanks for making my answer as best!! 😊😊
25th Feb 2018, 10:47 PM
ASIF BILAKHIYA
ASIF BILAKHIYA - avatar
25th Feb 2018, 11:13 PM
John M
John M - avatar
0
https://code.sololearn.com/cAS2IlD10qdf/?ref=app
31st Mar 2018, 7:28 AM
D Janapriya
D Janapriya - avatar