全文预览

c语题库(非计算机专业)

上传者:非学无以广才 |  格式:pdf  |  页数:78 |  大小:8038KB

文档介绍
r=0J=0;num[i]!=0;i++){\rif(num[i]>='A'&&num[i]<='F')\rnumber=number*16+(num[i]-55);\relseif(num[i]>='a'&&num[i]<='f')\rnumber=number*16+(num[i]-87);\relseif(num[i]>='0'&&num[i]<='9')\rnumber=number*16+(num[i]-48);\r}\rprintf("Dec=%ld\n",number);\r)\r)\re>s@ˆn‰@)\r#include<stdio.h>\rintmain()\r{intri,repeat;\rinti,n;\rfloats,t;\rscanf("%d",&n);\rs=0;\rt=l"\rfor(i=l;ri<=n;i++){t=t*1.0/i;\rs=s+t;\rprintf("%.4f\n",s);\r)\r}EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\re>s@ˆn‰@)\r#include<stdio.h>\rintmain()\r{intri,repeat;\rinti,n;\rdoubles;\rdoublefact(intn);\rscanf(“#d”,&repeat);\rfor(ri=l;ri<=repeat;ri++){scanf("%d,,&n);\r,\rs=0;\rfor(i=l;i<=n;i++)\rs+=fact(i);\rprintf(“%.4f\n”,s);}}\rdoublefact(intn){\rintj,t=l;\rdoublex;\rfor(j=l;j<=n;j++){t*=j;\rx=1.0/t;\rreturn(x);\r}\r}

收藏

分享

举报
下载此文档