Prime Number or Not

Help Required in ‘Prime or Not’

Hey there I’ve been working around this code in C++. Since the constraints were high so I opted for Prime Sieve. I am getting error:

/bin/run.sh: line 4: 17 Segmentation fault (core dumped) ./exe

Kindly check the code below:

Thanks very much :slight_smile: