Question: Add a function int countPrimes(int a, int b); that returns the number of prime numbers in the interval a x b. Change the main function

Add a function int countPrimes(int a, int b); that returns the number of prime numbers in the interval a x b. Change the main function to test the new code.

Please, it needs to be a function above/before the main function and it is necessary to use the given names. Thanks

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!