using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bt_55
{
class Program
{
static void Main(string[] args)
{
int a, b,i,dem=0;
do
{
Console.Write("nhap a="); a = int.Parse(Console.ReadLine());
Console.Write("nhap b="); b = int.Parse(Console.ReadLine());
} while (a >= b);
if (b <= 2)
Console.Write("khong co so nguyen to thoa man de bai");
if (a > 2 && b < 6)
{
Console.Write("so nguyen to la:" + "2\t");
for (i = 1; i < b; i++)
{
for (int j = 2; j <= b; j++)
{
if (i % j != 0 && i > 1)
Console.Write(i);
}
}
}
if (a > 5)
{
Console.Write("cac so nguyen to tu 1 den n la:" + "2\t3\t5\t");
for (i = 1; i < b; i++)
{
for (int j = 2; j <= b ; j++)
{
if (i % j != 0 && i % 5 != 0 && i > 1 && i % 2 != 0 && i % 3 != 0)
Console.Write(i + "\t");
dem = dem + 1;
if (dem > 1) break;
}
}
}
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace bt_55
{
class Program
{
static void Main(string[] args)
{
int a, b,i,dem=0;
do
{
Console.Write("nhap a="); a = int.Parse(Console.ReadLine());
Console.Write("nhap b="); b = int.Parse(Console.ReadLine());
} while (a >= b);
if (b <= 2)
Console.Write("khong co so nguyen to thoa man de bai");
if (a > 2 && b < 6)
{
Console.Write("so nguyen to la:" + "2\t");
for (i = 1; i < b; i++)
{
for (int j = 2; j <= b; j++)
{
if (i % j != 0 && i > 1)
Console.Write(i);
}
}
}
if (a > 5)
{
Console.Write("cac so nguyen to tu 1 den n la:" + "2\t3\t5\t");
for (i = 1; i < b; i++)
{
for (int j = 2; j <= b ; j++)
{
if (i % j != 0 && i % 5 != 0 && i > 1 && i % 2 != 0 && i % 3 != 0)
Console.Write(i + "\t");
dem = dem + 1;
if (dem > 1) break;
}
}
}
Console.ReadKey();
}
}
}