0
this is code to find sum of all.prime below 2 million...i get a segmentation fault(core dumped)...please correct code
answer is 142913828922 code: https://code.sololearn.com/cLqaNpcZIq6O/?ref=app
9 Respuestas
0
ben allen... that is not necessary
buddy
+ 4
Yes visualmedia ytb , please
+ 3
you can't store the answer in long int
You might in long long unsigned though
+ 3
This code is hard to understand. Would you mind adding comments.
+ 3
visualmedia ytb can you show us the final version please ? I am a bit curious
+ 2
For starters, return type void isn't valid for main. It has to return 0
+ 1
In know it's not sufficient. It was just the first issue I saw. I looked at your code for 30-45 minutes trying to solve it but it's hard to understand what's going on. Please clean up and comment your code.
+ 1
ben allen i just wanna find sum of all primes below 2 million... that was my task... i just modified my code ... it works... do you wanna see the modified one!??
0
thanks everyone i modified my code... it works pretty well now...