Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static bool IsPrime(BigInteger Num) // podstawowy
- {
- OpDivision = 0;
- {
- if (Num < 2) return false;
- else if (Num < 4) return true;
- else if (Num % 2 == 0)
- {
- OpDivision++;
- return false;
- }
- else for (BigInteger u = 3; u < Num / 2; u += 2)
- if (Num % u == 0)
- {
- OpDivision++;
- return false;
- }
- else return true;
- }
- Console.WriteLine(OpDivision);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement