Question: You will be creating a main() function and an isPrime function to practice functions, loops, and basic outputs. You will submit ONE file on Canvas

You will be creating a main() function and an isPrime function to practice functions, loops, and basic outputs. You will submit ONE file on Canvas called LastName_Firstname_HW2B.cc (or .cpp). Instructions: 1. Prompt a user to type in a positive integer from the keyboard. 2. Write a function called isprime that returns true if the number is prime and false if it is not. The isPrime function will be of bool data type. 3. Output your result to include what number was tested and the result. Example output: Please enter a positive integer: *User enters 2753 The number 2753 is: PRIME Please enter a positive integer: *User enters 4000000* The number 4000000 is: NOT PRIME
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
