void TestRe()
{
int a[3][3] = {
{1, 2, 3},
{4, 5, 6},
{7, 8, 9}
};
int b[3][3];
//旋转
for (int i = 0; i <= 2; ++i)
{
for (int j = 0; j <= 2; ++j)
{
b[j][2-i]= a[i][j];
}
}
//输出旋转后的方阵
for (int i = 0; i < 3; ++i)
{
int a[3][3] = {
{1, 2, 3},
{4, 5, 6},
{7, 8, 9}
};
int b[3][3];
//旋转
for (int i = 0; i <= 2; ++i)
{
for (int j = 0; j <= 2; ++j)
{
b[j][2-i]= a[i][j];
}
}
//输出旋转后的方阵
for (int i = 0; i < 3; ++i)