全文预览

c语言上机大题

上传者:相惜 |  格式:pdf  |  页数:187 |  大小:9126KB

文档介绍
---*/\r#include<stdio.h>\rvoidwjt();\rlongintfun(intn)EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\r/**********Prograiii**********/\r/**********End**********/\r}\rmain()\r(\rintn;\rlongintresult;\rscanf(“%d$,&n);\rresultfun(n);\rprintf($%ld\n$,result);\rwwjt();\r}\rvoidwwjt()\r(\rFILE*IN,*OUT;\rinti;\rintilN;\rlongintiOUT;\rIN=fopen($in.dat$,$r$)6\rif(IN==NULL)\r(\rprintf(''PleaseVerifyTheCurrerntDir..ItMayBeChanged");\r)\rOUTfopen($out.dat$,$w$)6\rif(OUT==NULL)\r(\rprintf("PleaseVerifyTheCurrentDir..ItMayBeChanged");\r)\rfor(i=0;i<10;i++)\r(\rfscanf(IN,"%dzp,&iIN);\riOUT=fun(ilN);\rfprintf(OUT,$¯ld\n 0iOUT);\r)\rfclose(TN);\rfclose(OUT);EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\r}\rnoY-\rinti;\rfloatf=l,s=0;\rfor(i=l;i<=n;i++)\r{f=f*i;\rs=s+f;}\rreturns;

收藏

分享

举报
下载此文档