.\r??:\r2 .\r:\r^in clu d e "stdio. h "\rs tr u c t student\r{ char num[6];\rchar name [8];\rin t scoref3J;\rflo a t avr;\r} stu [5 ];\rmain ()\r{in t i, j, sum;\rf i l e *fp;\r/ * in p u t* /\rfo r (i-0; i<5; i++)\r{ p r i n t f ('\n p lea se in p u t no. %d score: \n', i ) ;\rp rin tf( " s tu n o :");\rscanf("% s ”, stu. num);\rp rin t f ( "name: ) ;\rsca n f('% s”, stu. name);\rsum=O;.\rfor(j=0;j<3;j++)\r{ prin t f Cscore %d. ”, j+1);\rscanf &stu. score[j]);\rsum+=stu. score [ j];\r)\rstu. avr-sum/3. 0;\r}\rfp=fopen ("stud", ;\rfo r (i-0; i <5; i++)\rif(fwrite(& stu, size o f (struct student), 1, fp) 1-1)\rp r in tf ("file write error \n^);\rfclose (fp);