using System; using System.Numerics; using System.Diagnostics; namespace ProjektAlgorytmy2 { class Program { static void Main(string[] args) { BigInteger[] tablica = new BigInteger[] { 100913, 1009139, 10091401, 100914061, 1009140611, 10091406133, 100914061337, 1009140613399 }; //tablica z wyrazami for( int i = 0 ; i < tablica.Length ; i++ ) //pętla wykonująca funkcję IsPrime dla wszystkich wyrazów tablicy ,,tablica" { IsPrime2(tablica[i]); } } static bool IsPrime2( BigInteger Num ) //przyzwoita funkcja { if (Num < 2) return false; else if (Num < 4) return true; else if (Num % 2 == 0) return false; else { for (BigInteger u = 3; u*u <= Num; u += 2) { if (Num % u == 0) return false; } } return true; } } }