欢迎来到第壹文秘! | 帮助中心 分享价值,成长自我!
第壹文秘
全部分类
  • 幼儿/小学教育>
  • 中学教育>
  • 高等教育>
  • 研究生考试>
  • 外语学习>
  • 资格/认证考试>
  • 论文>
  • IT计算机>
  • 法律/法学>
  • 建筑/环境>
  • 通信/电子>
  • 医学/心理学>
  • ImageVerifierCode 换一换
    首页 第壹文秘 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    编译文档中示例源程序.docx

    • 资源ID:1016465       资源大小:10.78KB        全文页数:4页
    • 资源格式: DOCX        下载积分:5金币
    快捷下载 游客一键下载
    账号登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    下载资源需要5金币
    邮箱/手机:
    温馨提示:
    快捷下载时,如果您不填写信息,系统将为您自动创建临时账号,适用于临时下载。
    如果您填写信息,用户名和密码都是您填写的【邮箱或者手机号】(系统自动生成),方便查询和重复下载。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    编译文档中示例源程序.docx

    mainadd100;functionadd(x:Integer):float;varresult:Integer.beginifx=lthenreturnX;result:=x+add(x-l);returnresult;end;beginjpl.printint(add(100);end.mainE;varnums:Integer;es:Float;/ArrayofFloat.i:Integer;functionfactorial(Times:Integer):float;varResultiFloat;beginResult:=1.0;while(Times>0)dobeginResulti=Result*Times;Timesi=Times-I;end;return1/Result;end;functione(1.evel:Integer):float;varResult:Float;beginResult:=1.0;while(1.evel>0)dobeginResult:=Result+factorial(1.evel);1.evel:=1.evel-1;end;returnResult;end;beginnums:=2;while(factorial(nums)>=0.00000001)dobeginnums:=nums+l;end;IwantourEexcatlyenough,soitrytofindafactiriallessthanthat.Thisnotverysmart,butmayletyouseemoreJP1.O.)nums:=nums-l;newarrayes:=Floatnums;es0:=2.O;esl:=2.5;i:=2;fori:=2to(nums-l)dobeginesi:=e(i+l);end;fori:=0tonms-ldobeginjpl.printfloat(esi);end;end.mainfibinacci_float;vari:Integer;list:float;functionfunc(i:Integer):float;beginif(i=O)thenreturn1.O;if(i=1)thenreturn1.O;return(func(i-l)+func(i-2);end;beginnewarraylist:=float20;fori:=0to19dobeginlisti:=func(i);end;1 :=0;fori:=0to19dobeginJP1.O.PRINTF1.OAT(listi);end;end.mainpl02;var1: Integer;list:Integer;functionfunc(i:Integer):Integer;beginif(i=0)thenreturn1;if(i=1)thenreturn1;return(func(i-l)+func(i-2);end;begini:=O;newarrayIiSt:二InIeger20;while(i<20)dobegin/JP1.O.Printint(func(i);listi:=func(i);i:=i+1;end;i:=0;while(i<20)dobeginJP1.O.PRINTINT(listi);i:=i+l;end;end.mainP1.o3;beginif(true)thenjpl.printint(1+(2*4/4)+1);end.mainHelloWorld;constNumsiInteger=20;HelloWorldStrrString=,HelloWorld!”;vari:Integer;functionfund(x:Integer):Boolean;varc:char;beginforc:=,a,to,a,+xdobeginJP1.O.PRINTCHAR(c);end;returnfalse;end;beginfund(Nums);JP1.O.Printstring(HelloWorldStr);JP1.O.PrintStringCzHelloworldagain!z,);end.mainprime;vari,j:Integer;IsPrimeiBoolean;functionmod(x,y:Integer):Boolean;beginif(x%y=0)thenreturntrueelsereturnfalse;endbeginfori:=2to100dobeginISPRIME:=TRUE;forj:=2toi/2dobeginif(mod(i,j)thenbeginj:=1000;ISPRIME:=False;end;end;/ifnot(j>=1000)thenthislineisOK,buti/wanttoshowyouBoolean.)if(IsPrlmE)thenJP1.O.printint(i);end;end.mainTypes;procedureShowType(XiInteger);beginJP1.O.PRINTSTRINGCltisanInteger./z);end;procedureShowType(XrFloat);beginJP1.O.PRlNTSTRINGritisaflaot.*);end;beginShowType(I);ShowType(2.1);end.mainwrongfunctionwrongx():integer;beginx=x+1;returnx+x;endbeginwrongx(3);end;

    注意事项

    本文(编译文档中示例源程序.docx)为本站会员(p**)主动上传,第壹文秘仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知第壹文秘(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2023 1wenmi网站版权所有

    经营许可证编号:宁ICP备2022001189号-1

    本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。第壹文秘仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知第壹文秘网,我们立即给予删除!

    收起
    展开