i=1改成i=0,放在for外面
#include<stdio.h>
int main(){
int b[3][3], m, n;
int a[9] = {3,4,6,7,8,9,2,1,3};
for(m = 0; m <3; m++){
for(n = 0; n < 3; n++){
printf("b[%d][%d] = %d\n", a[m*3 + n]);
}
printf("\n");
}
return 0;
}