This is good problem and I think my solution is correct but I am getting SIGFPE error for PRIME GENERATOR. The link of my code is here. This problem has been bugging me for hours. If anyone can solve this doubt, it will be a great help!
This is good problem and I think my solution is correct but I am getting SIGFPE error for PRIME GENERATOR. The link of my code is here. This problem has been bugging me for hours. If anyone can solve this doubt, it will be a great help!
It is a good idea to check against the worst case.
1 999990000 1000000000
Gives runtime error — https://ideone.com/06tNl2 Usually, SIGFPE means division by zero. I think you made a wrong assumption in your code, but I'll let you figure it by yourself.