#include<stdio.h>
#define N 5
void copy2(double (*parr2)[2] , double(*receive2)[2]);
int main(void)
{
const double arr[N][2] =
{
{1.2 , 2.2} , {3.3,4.4} ,
{5.5 , 6.6} , {7.7,8.8} , {9.9 , 1.1}
};
double target2[N][2];
printf("copy2 is :\n");
copy2(target2 , arr);
return 0;
}
void copy2(double (*parr2)[2] , double(*receive2)[2])
{
int x , y;
for(x = 0 ; x < N ; x++)
{
for(y = 0 ; y < 2 ; y++)
{
parr2[x][y] = receive2[x][y];
if(x >= 1 && x<= 3)
printf("%4g",parr2[x][y]);
if(y = 1 && x >= 1 && x<= 3)
printf("\n");
}
}
}
为什么这条代码卡着输出不了啊?看了好久不知道哪里有bug?请求帮忙一下,刚入门技术不行 T T