Question: For a program in C please! can you out in as many comments as possible. Thank you :) 3. Write a program that reads in
3. Write a program that reads in a number n between 1 and 987,654 and then prints out all the primes between 1 and n inclusive. It should also print a count of how many primes it printed and n/log(n). Test the program, and add a comment based on what you see. Hint 1: Try using the Sieve of Eratosthenes for finding all the primes less than n. (Wikipedia and Mathworld have descriptions of the Sieve of Eratosthenes, or ask if you don't understand how it works.) Hint 2: If you need a big array for this program, put it outside main! Otherwise your program may crash because it runs out of stack space
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
