Question: Language C++ Problem 1. (Lastname_Lab5_pl.cpp) Write a function named isPrime(int n) that accepts an integer n. If n is a prime number, the function returns
Language C++
Problem 1. (Lastname_Lab5_pl.cpp) Write a function named isPrime(int n) that accepts an integer n. If n is a prime number, the function returns 1, otherwise returns 0. Write another function countPrime(int m) that accepts an integer number m. The function should return the number of the prime numbers between 2 and m, inclusive. Your countPrime function should call is Prime function and your main function should call countPrime function. [20 points]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
