全文预览

计算机二级c语言程序——上机考库80套(附答案)

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

文档介绍
)||(j%3==0&&a1==5))\r(\rb[i]=jJ\ri++J\rreturni;\r)\rmain()\r(\rinta[50],i,n;\rn=fun(a);\rprintf(nTheresultis:");\rfor(i=0;i<n;i++)\rprintf(n%4dH,a[i]);\rprintf(M\nH);\r)\rzL{GN\r&{8+fun,-QRS!|}_"$3VmWX9]~P€W‚%\r!;*+Tƒ„Im"#50…?"$s=63.665791%\r&'()*+main,-.+P/012?3+funP†‡ˆ7#9{8P;\r<@A%\rBC!mPfr‰Š2‹q‰Š100%DEFGHI$?`%\r#include<math.h>\r#include<stdio.h>\rdoublefun(intm)\r(\rintn,k,iJ\rdoublesum=0.0;\rfor(n=3;n<=m;n++)\r(\rk=sqrt(n);\rfor(i=2;i<=k;i++)\rif(n%i==0)break;\rif(i>=k+l)\rsum+=sqrt(n);\r)\rreturnsum;\r)\rmain()\rintm;EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\rdoubles;\rFILE*out;\rprintf(M\n\nInputm:");\rscanf(n%d",&m);\rs=fun(m);\rprintf("\n\ns=%f\n\n",s);\rout=fopen(,,outfile.dat",',w");\rfor(m=0;m<10;m++)\rfprintf(out,M%f\n",fun(m+80));\rfclose(out);

收藏

分享

举报
下载此文档