isprime in cpp code example
Example: check prime in c++
#include
using namespace std;
#define ll long long
bool isPrime(ll number){
for(ll i = 2; i <= number / 2; i++){
if(number % i == 0)
{
return false;
break;
}
}
return true;
}