i try to find prime number by use that code:
public static void TongSoNguyenTo()
{
var tongchiahet = 0;
for (var so=2;so<20;so++)
{
for (var chia=1;chia<=so;chia++)
{
if (so % chia == 0)
{
tongchiahet++;
if (tongchiahet == 2)
{
Console.WriteLine(so);
}
}
}
}
Console.ReadKey();
}
but instead of list of number, it can write one number. what can i do next