Question: Write C++ program that asks the user to enter an integer greater than 1 (do input validation), then pass the number to a function to
Write C++ program that asks the user to enter an integer greater than 1 (do input validation), then pass the number to a function to determine whether it is prime or not. The function does not output anything, and only receive one integer argument, and return true if the number is a prime and return false if not prime. Then output whether the number is prime or not in main function. Dont use scanner and print. Use cout and cin
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
