第二个for循环中的第二个printf应该是printf("\n");你写成printf("%d")了,由于没有给出%d对应的变量,所以输出了一个负数垃圾值了第二张图改为scanf("%d",&a[n]);没有变量取地址
发代码,别发图片