全文预览

计算机二级上机编程题总结

上传者:幸福人生 |  格式:pdf  |  页数:80 |  大小:7455KB

文档介绍
=0.0;\rinti,j=0;\rfor(i=0;i<N;i++)\raver+=a[i].s;\raver/=N;\rfor(i=0;i<N;i++)\rif(a[i].s>=aver)\r(\r*(b+j)=a[i];\rj++\r}\r*n=j;\rreturnaver;\r)\rmain()\r(\rSTRECs[N]={{"GA05H,85},{"GA03n,76},{"GA02,,,69},{"GA04",85},\r{“GA01”,91},{“GA07”,72},{“GA08”,64},{“GA06”,87},\r{uGA09",60},{"GA11n,79},{UGA12",73},{"GA10n,90});EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\rSTRECh[N],t;\rFILE*out;\rinti,j,n;\rdoubleave;\rave=fun(s,h,&n);\rprintf("The%dstudentdatawhichishigherthan%7.3f:\n",n,ave);\rfor(i=0;ivn;i++)\rprintf("%s%4.1f\n",h[i].num,h[i].s);\rprintf("\n");\rout=fopen("out12.dat","w");\rfprintf(out,"%d\n%7.3f\n",n,ave);\rfor(i=0;i<n-1;i++)\rfor(j=i+1;jvn;j++)\rif(h[i].s<h[j].s)\r(\rt=h[i]\rh[i]=h[j]\rh[j]=t\r)\rfor(i=0;i<n;i++)\rfprintf(out,"%4.1f\n",h[i].s);\rfclose(out);\r)

收藏

分享

举报
下载此文档