摘要:
返回一个螺旋数数组 static public int[,] SpiralNumSort(int num) { int temp = num % 2 > 0 ? (num / 2 + 1) : (num / 2); int[,] arynum = new int[num, num]; int number = 0; for (int q = 0; q < temp; q++) { for (int i = q; i < num - q; i... 阅读全文
摘要:
static public int[,] NineNumSort(int num) { int[,] arynum = new int[num, num]; int max = num - 1; int x = 0; int y = 0; arynum[x, num / 2] = 1; y = num / 2; for (int i = 2; i <= num * num; i++) { ... 阅读全文