private void button2_Click(object sender, EventArgs e) { Reverse r = new Reverse(5); r.Calc(); Josephus3.Reverse(5); }
private void button10_Click(object sender, EventArgs e) { int[,] m1 = new int[, ] { { 1, 2, 3 }, { 4, 5, 6 } }; Josephus3.PrintMatrix(m1, 2, 3); int[,] m2 = new int[, ] { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } }; Josephus3.PrintMatrix(m2, 3, 3); Josephus3.Matrix(m1, 2, 3, m2, 3, 3); }
private void button1_Click(object sender, EventArgs e) { Josephus j = new Josephus(9, 1, 5); j.Start(); Console.WriteLine("***"); Josephus2 j2 = new Josephus2(9, 1, 5); j2.Calc(); Console.WriteLine("***"); Josephus3.Calc(9, 1, 5); }
private void button9_Click(object sender, EventArgs e) { int[] datas = new int[501]; for (int i = 0; i < 250; i++) { datas[i] = i + 1; } for (int i = 0; i < 250; i++) { datas[i + 250] = i + 1; } datas[500] = 500; Josephus3.Calculate(datas); }