编译文档中示例源程序.docx
《编译文档中示例源程序.docx》由会员分享,可在线阅读,更多相关《编译文档中示例源程序.docx(4页珍藏版)》请在优知文库上搜索。
1、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(Times0)dobeginResult
2、i=Result*Times;Timesi=Times-I;end;return1/Result;end;functione(1.evel:Integer):float;varResult:Float;beginResult:=1.0;while(1.evel0)dobeginResult:=Result+factorial(1.evel);1.evel:=1.evel-1;end;returnResult;end;beginnums:=2;while(factorial(nums)=0.00000001)dobeginnums:=nums+l;end;IwantourEexcatlyenou
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 编译 文档 示例 源程序
