二维数组行数求和这个问题出在哪里啊
#include <stdio.h>int main()
{
int a[5][5] = {{0, 1, 2, 3, 4}, {1, 2, 3, 4, 5}, {2, 3, 4, 5, 6}, {3, 4, 5, 6, 7}, {4, 5, 6, 7, 8}};
for (int i = 0; i < 5; ++i)
{
int sum = 0;
for (int j = 0; j < 5; ++j)
{
sum = sum + a[i][j];
}
printf("Line %d sum = %d\n", i, sum);
}
return 0;
}