my concept is write but i am making some mistake in the code which i can not identify, if you can help me with it
T-Prime, segmentation fault and unknown error
@SATVIK
There are few mistakes in your code. I am pointing them
- line 45 should be vector prime = primeSieve(p,1000004);
- use long long int while declaring sr.
- use long long int for i and j in primesieve function
here is the updated code: https://ide.codingblocks.com/s/246087
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.