Reference no: EM132210397
Question :
Write a program that obtains the execution time for finding all the prime numbers less than 8,000,000, 10,000,000, 12,000,000, 14,000,000, 16,000,000, and 18,000,000 using the algorithms in Listings 22.5-22.7.
Enter the max value from the keyboard. Start your timer after the input is read from the keyboard and end it after the prime numbers print out.
Compare the results with and without output. Fill out the chart for each algorithm, both with output and without.
Once you have filled out the table (see pg. 857), analyze the results.
Explain the trends and differences that you notice in the runtimes and why those things are happening.