#define NUM 3
int data0[NUM][NUM];
int data1[NUM][NUM];
int data2[NUM][NUM];
int main(int argc, char* argv[])
{
int i,j;
printf("Berfore convert:\n");
for(i=0;i
printf("%d ",data0[i][j]);
}
printf("\n");
}
for(i=0;i
data2[i][j]=data0[(NUM-1)-j][i];//顺时针旋转90度
}
}
printf("After convert N90\n");
for(i=0;i
printf("%d ",data1[i][j]);
}
printf("\n");
}
printf("After convert S90\n");
for(i=0;i
printf("%d ",data2[i][j]);
}
printf("\n");
}
while(1);
return 0;
}