北京理工大学C语言题目游戏2048
# include & ltstdio.h & gt
# include & ltstring.h & gt
int main()
{
int CPP(int *);
int输入(int *,int);
int n,a[4][4];
scanf("%d ",n);
for(int I = 0;我& ltn;i++)
{
输入(a,n);
cpp((输入));
}
返回0;
}
int输入(int *a,int n)
{
int a[4][4],n;
for(int I = 0;我& lt4;i++)
for(int j = 0;j & lt4;j++)
scanf("%d ",& ampa[I][j]);
}
int cpp(int *p)
{
for(int I = 0;我& lt4;i++)
{
for(int j = 0;j & lt4;j++)
{ if(a[I][j]= = a[I+1][j]| | a[I][j]= = a[I][j+1]){ goto moto;打破;}
否则转到错误;打破;} }
moto:{printf("是的。\ n ");返回0;}
错误:{ printf(" no . \ n ");返回0;}
}