using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication4 { class Program { static void Main(string[] args) { int a = Convert.ToInt32(Console.ReadLine()); int b = Convert.ToInt32(Console.ReadLine()); for(int i= a;i<= b;i++) { int k = 0; { for (int j = 1; j <= i; j++) { if (i % j == 0) { k++; } } if (k == 2) { Console.WriteLine(i); } } } Console.ReadLine(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)