Skip to content
Sign upLog in
← Back to Community
An Error in my repl.it
Profile icon
nika5050a

I just wrote up this simple code that generates primes in c++.The code seems to run correctly on smaller amount of primes, however when I increase the amount of primes that are generated I get the error message "exit status -1" .I tried googling what the error message meant but wasn't able to find anything useful. Can someone tell me what I'm doing wrong? Thank you in advance.
This file cannot be displayed: https://storage.googleapis.com/replit/images/1531880378623_63af95bbf79bfd77e65daa0c56201f8a.pn

Answered by timmy_i_chen [earned 5 cycles]
View Answer
Voters
Profile icon
ThijmenkuipersK
Profile icon
nika5050a
Comments
hotnewtop
Profile icon
timmy_i_chen

Sorry for this, we need better error messaging. The error you're getting is:
signal: floating point exception (core dumped)

Profile icon
Thanhbarbarian

When I print color"yellow" but the output is "orange".I don't know what problem is. But I still used it from last month and now I can not use it. Can anyone help me?

Profile icon
nika5050a

I fixed the array to include 13 as the base case. It seems to fix the error (Division by 0).