a prime number is a number that is only evenly divisible by itself and 1. for example, the number 5 is prime because it can only be evenly divided by 1 and 5. the number 6, however, is not prime because it can be divided evenly by 2 and 3.

Respuesta :

A prime number is one that can only be divided evenly by itself and one. For instance, the number 5 is prime because it can only be divided evenly by 1 and 5. However, the number 6 is not prime because it can be divided evenly by 2 and 3, 18.

Here we have programming for this:

  • #include iostream> with the namespace std;
  • isPrime (bool int num); int main () int num=0;
  • "Enter a number and I'll tell you if it's prime: "; cin >> num;
  • If (isPrime(num)==true), then cout num " is prime."; otherwise, cout num " is NOT prime."
  • return zero;
  • isPrime bool (int input)
  • if(input1) returns false; otherwise, if (input== 1||input==2 ||input==3)
  • return false;
  • else
  • for(i=2 int; iinput; i++)
  • if(input%i==0) return false; return true;

Read more about prime number:

https://brainly.com/question/145452

#SPJ4