0

I´m new at programming with Swift and wanted to make a program calculating prime numbers. I made it in a playground and first only as a playground program. Then I wanted to make it a function, so i can calculate prime numbers in a Intervall from 0 to a chosen number in another function. Only as a playground it all went well, but as a function it doesn't work anymore and brings the Error " EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)". Do you Guys have a idea how to fix this?enter image description here

0 Answers0