Блог пользователя shyam81295

Автор shyam81295, история, 9 лет назад, По-английски

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!

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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.