I'm having some trouble modifying an is_prime() function to accept only Gaussian primes.
The three conditions I need to incorporate (for a+bi) are:
(1) if a=o && b=4n+3
(2) if b=0 && a=4n
(3) if a^2 + b^2 is a general prime number
I know that I need to add conditions that if any of these three conditions are met, then the compiler should return 'true' and then output the values in a vector. And I know that I need to add these conditions as loops, I'm just not sure how to add the condition involving 4n+3.
Here's what I'm trying to modify, any help would be great!
using namespace std;
cout << "Enter a value for N_MAX : "; cin>>N_MAX;