日期:2014-05-17 浏览次数:20818 次
private void button2_Click(object sender, EventArgs e)
{
int n = 20; //N(16<N<32)
int m = 5; //M(2<M<10)
string s = "";
for (int i = 0; i < n; i++)
{
s += i.ToString() + ",";
}
string str = getCount2(s, m, n, n);
MessageBox.Show(str);
}
private string getCount2(string s, int m, int n, int len) //杀掉1个后下一个重新开始报数
{
if (16 < n && n < 32 && 2 < m && m < 10)
{
}
else
{
return "N(16<N<32),M(2<M<10)";
}
bool bl = false;
string ss = "";
string s1 = "";
string s2 = "";
textBox1.Text += s + "\r\n"; //枪毙过程
string[] list = s.Split(',');
for (int i = 0; i < len; i++)
{
if (len < m)
{
if (i + 1 ==&nbs