全文预览

C语言题目集锦

上传者:蓝天 |  格式:pdf  |  页数:77 |  大小:9894KB

文档介绍
e(out);\r)\rmain()\r{charstr[5O];\rvoidfun(char*str);\rgets(str);\rfun(str);\rprintf(nTheresultstringis%s.\n",str);\rPRINT(str);\r)\rvoidfun(char*str)\r{char*p;\r34\rؖ—"˜™w–š8ÙÚC›'ÛÜJWC?@X–š'8ÙÚC›S\rMmain´;R\n´;fun-.ˆ—"ÛÜJ¯˜™aveCÝX?PÞ\rÈßà?? ‹©vª@«jk¬;W\r#include<stdio.h>\r#defineN8\rtypedefstruct\r{charnum[10];\rfloatscorefN];\rfloatave;\r}STREC;\rPRINT(floata)\r{FILE*out;\rif((out=fopen("resuIt.txtn,nw+n))!=NULL)\rfprintf(out,nave=%5.2fn,a);\rfclose(out);\r)\rmain()\r{inti;\rSTRECst={”J1003”,88.5,76,92.5,89,98,79577.5,99};\rvoidfun(STREC*p);\rfun(&st);\rprintf("The%s'sstudentscores:\nn,st.num);EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\rfor(i=0;i<N;i++)printf("%6.1f",st.score[i]);\rprintf(',\nave=%5.2f\n',,st.ave);\rPRINT(st.ave);\r)\rvoidfun()\r{inti;\rfloatav;

收藏

分享

举报
下载此文档