Question: A C++ Data Structures program question Develop and test a recursive function to check if positive integer n is a prime. An integer n is
A C++ Data Structures program question
Develop and test a recursive function to check if positive integer n is a prime. An integer n is a prime if is divisible only by 1 and itself and not by any integer in the range from 2 to sqrt(n) (both inclusive). Note: 0 and 1 are not prime numbers. The sqrt function provided by library returns a double and you must consider only the integral part of it.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
