c语言,二维数组斜线遍历,依次把这些数打印出来。没有思路啊,求助。_百 ...答:int main(){ int r,c,i,j,m,n;scanf("%d %d",&r,&c);int a[r][c];for(i=0;i<r;i++)for(j=0;j<c;j++)scanf("%d",&a[i][j]);for(i = 0; i < c+r-1; i++){ n = 0,m = i;for(j = 0; j <= i; j++){ if(n>=0 && m>=0 && n<r && m<...
C语言中,如何描述“遍历二维数组某一格周围格子”?答:int dir[8][2] = { -1, 0,1, 0,0, 1,0, -1,-1, -1,-1, 1,1, -1,1, 1};int x, y, i, next_x, next_y;/*然后设当前位置为第x行第y列,一共n行m列,行号列号从0开始到n-1和m-1*/ for (i = 0; i < 8; i ++){ next_x = x + dir[i][0];next_y...