摘要: 在n*n方阵里填入1,2···,n*n,要求天成蛇形,如n=4时。10 11 12 19 16 13 28 15 14 37 6 5 1 #include<stdio.h> 2 #include<string.h> 3 #define MAX 10 4 int a[MAX][MAX];//注意定义在main()外的好处; 5 int main() 6 { 7 int n,tot; 8 int x,y,i,j; 9 scanf("%d",&n);10 memset(a,0,sizeof(a));11 a[x=0][ 阅读全文
posted @ 2012-09-19 17:03 尔滨之夏 阅读(1878) 评论(0) 推荐(0) 编辑