标签:
static void Main(string[] args) { int mRead = int.Parse(Console.ReadLine()); string mValue = ""; Random mRandom = new Random(); int i; for (i = 2; i < mRead; i++) { int x = 0; for (int j = 2; j < i; j++) { if (i % j == 0) { x++; break; } continue; } if (i == 1 && x == 0) { mValue += i + ","; } } Console.WriteLine(mValue); Console.ReadKey(); }
标签:
原文地址:http://www.cnblogs.com/wdkyongxin/p/4305604.html