Question: the following code are to be use with assignment. 8. (25 points) Write a C++ program called sieve.cpp that implements the sieve of Eratosthenes algorithm

the following code are to be use with assignment.

8. (25 points) Write a C++ program called sieve.cpp that implements the sieve of Eratosthenes algorithm in our textbook (page 6~ 7). The following video will help your understanding of the algorithm: https://youtu.be/klcIklsWzrY For the assignment, you can assume that the user always enters a positive integer which is bigger than 1. For the program, you have to use a dynamic memory to create array(s) to store data. For details on the dynamic memory, read http://www.cplusplus.com/doc/tutorial/dynamic/ for p +2 to n do A[p] + p for p +2 to do if A[p] +0 I/see note before pseudocode /lp hasn't been eliminated on previous passes j+ p*p while j
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
