文章
11
粉丝
69
获赞
1
访问
6.6k
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#include <string.h>
bool isequal(int arr1[][9], int arr2[][9], int n)
{
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if (arr1[i][j] != arr2[i][j]) return false; // 如果发现不相等的元素,立即返回false
}
}
return true;
}
int main()
{
int n;
while (scanf("%d",&n)!=EOF)
{
int arr[9][9];
int arr90[9][9];
int arr180[9][9];
int arr270[9][9];
int arrin[9][9];
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
scanf("%d", &arr[i][j]);
}
}
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
scanf("%d", &arrin[i][j]);
}
}
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
arr90[j][n - i-1] = arr[i][j];
}
}
for (int i = 0; i < n; i++)
{
for (int j = 0; j...
登录后发布评论
暂无评论,来抢沙发