Machine Organization I
V22.0201 - Fall 2002
Due: Tuesday, Dec. 17th
Sieve of Erasthosenes Prime
Number Generator Redux
Redo the Sieve of Erasthosenes Prime Number Generator you created in Assignment
3, but this time code it in C.
Here are some new considerations:
Limit your range to numbers less than some constant value, say, max=5000.
Error check your input against this value.
Your array this time will be integers and not bits. (It is possible to
do bit manipulation in C, but that is not the point of this assignment.)
Declare an array of max in main and initialize it. A pointer to the array
will be passed to the various functions in your program.
Access the array using ONLY pointers - Don't use subscripts!
As before, input the number N, and output all the prime numbers less than
or equal to N and the count of those prime numbers
Make certain that your program is constructed in a 'top-down' manner, and
that it has been divided into several, reasonably chosen functions
Make certain that your program is well commented