wmi-parprog/01_primes/readme.md
2024-03-04 15:49:43 +01:00

5 lines
328 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

In the file is_prime there is a number. Write a C program and check whether it is a prime number of not.
It seems that MillerRabin primality test is a good simple test algorithm (probabilistic one) if the number is prime or not. Here is a pseudocode for it:
https://en.wikipedia.org/wiki/Miller%E2%80%93Rabin_primality_test