top of page
Legion of Learners
www.lol-101.com
Home
Classrooms
Courses
About Us
Executive Team
Our Mentors
Board Members
Resources
Members
More
Use tab to navigate through the menu items.
Log In
Forum Comments
Class 1 hw 5/24
In Java Question Bank
mwmaxwang3131
May 27, 2020
thx man
0
Class 1 hw 5/24
In Java Question Bank
mwmaxwang3131
May 25, 2020
0
0
Class 1 HW 5/16
In Java Question Bank
mwmaxwang3131
May 23, 2020
did u copy me lol
0
0
Class 1 HW 5/16
In Java Question Bank
mwmaxwang3131
May 23, 2020
stop copying me XD
0
Class 1 HW 5/16
In Java Question Bank
mwmaxwang3131
May 22, 2020
1
0
Class 1 Homework 5/2
In Java Question Bank
mwmaxwang3131
May 04, 2020
public class Main { public static void main(String[] args) { int N = 100; boolean[] isPrime = new boolean[N + 1]; for (int i = 2; i <= N; i++) { isPrime[i] = true; } for (int i = 2; i*i <= N; i++) { if (isPrime[i]) { for (int j = i; i*j <= N; j++) { isPrime[i*j] = false; } } } // count primes int primes = 0; for (int i = 2; i <= N; i++) { if (isPrime[i]) primes++; } System.out.println( "The number of primes <= " + N + " is " + primes); } }
0
0
M
mwmaxwang3131
0
Followers
0
Following
Follow
Following icon
More actions
Profile
Forum Comments
Forum Posts
More
Use tab to navigate through the menu items.
bottom of page