全文预览

c习题答案旧版

上传者:苏堤漫步 |  格式:pdf  |  页数:77 |  大小:3590KB

文档介绍
floataverage;\rfor(i=0;i<5;i++)\r{printf(nnumbern);\rscanf("%s",stu[i].num);EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\rprintf("namen);\rscanf(u%s",stu[i].name);\rfor(j=0;j<3;j++)\r{printf("\nscore\n");\rscanf(n%d';&stu[i].score[j]);\r)\r)\raverage=O;\rmax=O;\rmaxi=O;\rfor(i=0;i<5;i-H-)\r{sum=O;\rfor(j=0;j<3;j++)\rsum+=stu[i].score|j];\rstu[i].avr=sum/3.0;\raverage+=stu[i].avr;\rif(sum>max)\r{max=sum;\rmaxi=i;\r)\r)\raverage/=5;\rprintf("numbernamescore1score2score3average\n");\rfor(i=0;i<5;i++)\r{printf(H%8s%10s1,,stu[i].num,stu[i].name);\rfor(j=0;j<3;j++)\rprintf(n%7d",stu[i].score[j]);\rprintf(M%6.2f\nu,stu[i].avr);\rprintf(',average=%5.2f\n,\average);EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\rprintfC'Thebeststudentis%s,sum=%d\nH,stu[maxi].name,max);

收藏

分享

举报
下载此文档