编译和连接无误但运行错误
#include <stdio.h>struct student{int num;char name[10];double score[3];double aver;};void main(){ void input(struct student stu[]);struct student max(struct... 展开
其他答案
你的程序max函数中:int i,m=0;stu[i].aver=(stu[i].score [0] +stu[i].score [1] +stu[i].score [2])/3.0;for(i=1;i<10;i++) {if(stu[i].aver>stu[m].aver)m=i;}你这样声明变量,i是不是赋值了.你试下.还有这几句只对 stu[0].aver进行了赋值,其它的 展开
2010-12-14 14:19
来自北京市
赞(0)点赞赞(0)举报
免责声明:问答内容均来源于互联网用户,房天下对其内容不负责任,如有版权或其他问题可以联系房天下进行删除。




