def prime_checker(number):
is_prime = True
for i in range(2, number):
if number % i == 0:
is_prime = False
if is_prime:
print(f"{number} is a prime number!")
elif not is_prime:
print(f"{number} is not a prime number!")
else:
return
n = int(input("Enter a number: "))
prime_checker(number=n)
vector<bool> isPrime(n,true);
int count=0, k;
for(int i=2;i<n;i++) {
if(isPrime[i]) {
count++;
for(k=2;i*k<n;k++)
isPrime[i*k]=false;
}
}
if (x%2 > 0 && x%3 > 0 && x%5 > 0 && x%7 > 0)
echo "Not a Prime Number";
else
echo "Prime Number"
// If anyone finds this to be incorrect, please comment
// I created this conjecture