#include<stdio.h>
#define value 11
void main()
{
int i=0,j=0,m=0,n=0,max=0;
int num[value][value];
for (i=0;i<value;i++)
{
for(j=0;j<value;j++)
{
max++;
num[i][j]=1;
}
int main()
{
int rows=0;
int max=0;
int distance=1;
int center=0;
int m=0;
int n=0;
int array[10][10];
static int num=1;
int i=0;
int j=0;
printf("how many rows do you want to output(rows<=10):\n");
scanf("%d",&rows);
max=rows*rows;
if((rows%2)==1)
{
center=m=n=(rows-1)/2;
}
else
{
center=m=n=(rows/2-1);
}
array[m][n]=num++;
函数void ChangeDirection(int *pR, int *pC, int **arr, int row, int *pDirection)应写成
void ChangeDirection(int r, int c, int **arr, int row, int *pDirection)的,算了,不改了,搂住自己改改好了。呵呵……