找大神求解为啥我这个输出不出来?萌新求助;
程序代码:
#include <stdio.h> #include <stdlib.h> void main() { struct xinxi { float ave[5]; char xingming[5]; char xuehao[5]; char dianhua[5]; char math[5]; char jisuanji[5]; }xinxi; int a=0,i; for(i=0;i<5;i++) { printf("请输入学号、姓名、电话、数学成绩、计算机成绩;"); scanf("%s%s%s%s%s",&xinxi.xuehao[i],&xinxi.xingming[i],&xinxi.dianhua[i],&xinxi.math[i],&xinxi.jisuanji[i]); } for(i=0;i<5;i++) { xinxi.ave[i]=xinxi.math[i]+xinxi.jisuanji[i]; } for(i=0;i<5;i++){ printf("%s%s%s%s%s",xinxi.xuehao[i],xinxi.xingming[i],xinxi.dianhua[i],xinxi.math[i],xinxi.jisuanji[i]); } }