Repo for all groups for "Paradygmaty programowania"
Go to file
Arkadiusz Hypki dc7375cee9 'Added a link for a test for prime numbers;' 2024-02-26 14:48:50 +01:00
is_prime 'Added file with a number to check if is a prime or not;' 2024-02-26 14:33:14 +01:00
readme.md 'Added a link for a test for prime numbers;' 2024-02-26 14:48:50 +01:00

readme.md

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