全文预览

计算机C语言习题重点资料

上传者:梦溪 |  格式:pdf  |  页数:57 |  大小:4089KB

文档介绍
>¦î!b]?\r>Á?&òóup>ðñ?çêËXôõ~[&=>ö÷p>ðñçê?ø>\rhij\r#include<stdio.h>\r#defineN16\rtypedefstruct\r{\rcharnumL10];\rints;\r}STREC;\rintfun(STREC*a,STREC*b)EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\rinti,j=0,max=a[O].s;\rfor(i=0;i<N;i++)\rif(max<a[i].s)max=a[i].s;\rfor(i=0;i<N;i++)\rif(a[i].s==max)b[j++]=a[i];\rreturnj;\r)\rvoidmain()\r{\rSTREC\rs[N]={{“GA005”&85},{“GA003”&76},{“GA002”&69},{“GA004”&85},\r{“GAOO1"&91},{“GA007”&72},{“GA008”&64},{“GA006”,87},{“GA0015\r”&85},\r{“GA0013”&91},{“GA0012”&64},{“GA0014”&91},{“GAOO11"&66},{“GA\r0017”&64},\r{“GA0018”&64},{“GA0016”&72},};\rSTRECh[N];\rinti,n;\rn=fun(s,h);\rprintf("The%dhighestscore:\nw,n);\rfor(i=0;i<n;i++)\rprintf("%s%4d\n",h[i].num,h[i].s);\rprintf("\n");EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\r)

收藏

分享

举报
下载此文档