Prime.c #18

Open
opened 2026-01-29 15:00:49 +00:00 by claunia · 0 comments
Owner

Originally created by @marthongt on GitHub (Mar 23, 2018).

I tested it with the lowest prime number but it tells me that it's actually not one.

Adding the following to isPrime function solved the issue for me
if (x == 2)
return 1;

Originally created by @marthongt on GitHub (Mar 23, 2018). I tested it with the lowest prime number but it tells me that it's actually not one. Adding the following to isPrime function solved the issue for me if (x == 2) return 1;
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#18