日期:2014-05-18 浏览次数:20966 次
private void button1_Click(object sender, EventArgs e) { int[] i = new int[] { 1, 3, 5, 7, 9 }; for (int j = 0; j < 2 << i.Length - 1; j++) { for (int k = 0; k < i.Length; k++) { if (k > 0) Console.Write(","); if ((j >> k & 1) == 1) Console.Write(100); else Console.Write(i[k]); } Console.WriteLine(); } }