class PRogram { static void Main(string[] args) { for (int i = 2; i <= 100; i++) { bool flag = true; int k = Convert.ToInt32(Math.Sqrt(i)); for (int j = 2; j <= k; j++) { if (i % j == 0) { flag = false; break; } } if (flag == true) { Console.WriteLine(i); } } Console.ReadLine(); } }