()2004-12-11 15:46:47\rP=Q?RS0T?RS=3UV:/W0!"`p;XY(Z[RS\0]^0_UV/W)0\r`a3bc/W\ra3:bcdX9Ae456“ Stud”7\r??\r# include "stdio.h"\rstruct student\r{ char num[6];\rchar name[8];.\rint score[3];\rfloat avr;\r} stu[5];\rmain()\r{ int i,j,sum;\rFILE *fp;\r/*input*/\rfor(i=0;i<5;i+ + )\r{ printf("\n please input No. %d score:\nH,i);\rprintf("stuNo:");\rscanf("%s",stu[i] .num);\rprintf(Mname:");\rscanf("%s",stu[i] .name);\rsum = 0;\rghi=jk0l;mn\rfor(j=0;j<3;j+ + )\r{ printf("score %d."J+ 1);\rscanf("%dM,&stu[i].score[j]);\rsum + = stu[i].score[j];\r)\rstu[i].avr=sum/3.0;\r)\rfp=fopen(“stud",“w“)<\rfor(i=0;i<5;i+ + )\rif(fwrite(&stu[i],sizeof(struct student),1 ,fp)!= 1)\rprintf("file write error\nn);\rfclose(fp);