c[i]);\rI\rfclose(fp);\r 100]\r¼'½PH'½3 ¾¿`%ÀPd@U(Á½ÃPÄÅ,\rm¾¿%À)PK\rÆÇ%ÀPÈÉ`@U.K`ÆÇ@ª¯X§¨“stud”Z?\r1 .\r2 .?\r#include "stdio.h"\rstruct student\r{ char num[6];\rchar name[8];\rint score[3J;\rfloat avr;\r} stu[5J;\rmain()\r{int i,j,sum;\rFILE *fp;\r/*input*/\rfor(i=0;i<5;i++)\r{ printf(M\n please input No. %d score:\n",i);\rprintf("stuNo:n);\rscanf("%s'\stu[i].num);\rprintf("name:");\rscanf("s”,stu[i].name);\rsum=0;\rfor(j=0;j<3;j++).\r{ printf(Mscore %d.",j+l);\rscanf(n%dn,&stu[i].score[j]);\rsum+=stu [i].score |j ];\r)\rstu[i].avr=sum/3.0;\r)\rfp=fopen(,,stud',,,'wn);\rfor(i=0;i<5;i++)\rif(fwrite(&stu[i],sizeof(struct student),l,fp)!=l)\rprintf("file write error\nn);\rfclose(fp);