Question: FUNCTIONS Your header file (functions.h) should contain all necessary include files for your functions.cpp and parallel_lab.cpp source files. The header file should also contain all

FUNCTIONS Your header file (functions.h) should contain all necessary include files for your functions.cpp and parallel_lab.cpp source files. The header file should also contain all the necessary function prototypes. ISPRIME FUNCTION bool isPrime(int); Given an integer n, returns true if n is prime and false if n is not prime. A number is considered prime if it is greater than 1 and has no factors between 2 and the square root of the number rounded up, inclusive. To accomplish this, your program should #include the cmath library to access the sqrt() function. PARALLEL_NUM_PRIMES FUNCTION int parallel_num_primes(int, int); Given integers lower_bound and upper_bound, returns the number of primes in that range inclusive. Print message to user before calculation that tells the user that you are finding the number of primes between the lower & upper boundand make sure to print out the actual numbers of the lower & upper bound. Calculation will be done in parallel. NOTE: must place the code (in red) below BEFORE the for loop that goes through the upper & lower bounds. #pragma omp parallel for reduction (+:counter) SEQUENTIAL_NUM_PRIMES FUNCTION int sequential_num_primes(int, int); Given integers lower_bound and upper_bound, returns the number of primes in that range inclusive. Print message to user before calculation that tells the user that you are finding the number of primes between the lower & upper boundand make sure to print out the actual numbers of the lower & upper bound. Calculation is done sequentially. DISPLAYMENUGETCHOICE FUNCTION int displayMenuGetChoice(); Displays a menu and returns the choice of the user. Validates input!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!