Question: C++ - Write a program to test whether a number is a prime number. - (Hint: A prime number is not divisible by any number
- Write a program to test whether a number is a prime number. - (Hint: A prime number is not divisible by any number except 1 and itself, so you can use a counter starting from 2 and up to 'input number minus 1, and test each counter number against the input number)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
