- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
* 调用过程: Private Function Fact(n as Integer) as Integer if n=1 then Fact = 1 else Fact = n* Fact(n-1) endif End Function Private Function Fact(n as Integer) if n =1 then Fact = 1 else Fact = n* Fact(n-1) endif End Function 4 5 n =2 n = 1 * 调用过程: Function Fact( 5 as Integer) Fact = 5* Fact(4) End Function Function Fact( 4 as Integer) Fact = 4* Fact(3) End Function Function Fact( 3 as Integer) Fact = 3* Fact(2) End Function Function Fact( 2 as Integer) Fact = 2* Fact(1) End Function Function Fact( 1 as Integer) Fact = 1 End Function * 运行下面的程序,单击窗体后,从键盘上输入字符串“abcdef”,窗体上显示的第一行输出结果为 第二行输出结果为 。 Private Sub Form_Click() Dim s1 As String, s2 As String s1 = InputBox(输入一个字符串) Try s1, s2 Print s1 Print s2 End Sub Private Sub Try(c As String, d As String) Dim a As String Static i As Integer i = i + 1 a = Mid(c, i, 1) If Mid(c, i, 1) Then Try c, d d = d a End Sub * Private Sub Form_Click() Dim s1 As String, s2 As String s1 = InputBox(输入一个字符串) Try s1, s2 Print s1 Print s2 End Sub ( 实参值:s1 = “abcdef” , s2 = “” ) * Private Sub Try(c As String, d As String) Dim a As String Static i As Integer i = i + 1 a = Mid(c, i, 1) If Mid(c, i, 1) Then Try c, d d = d a End Sub 1 ( c=s1 = “abcdef” , d=s2 = “” ) ( i = 1 , a = “a” , d = “” ) (s2 = d = “fedcba” ) * Private Sub Try(c As String, d As String) Dim a As String Static i As Integer i = i + 1 a = Mid(c, i, 1) If Mid(c, i, 1) Then Try c, d d = d a End Sub 2 ( c=s1 = “abcdef” , d=s2 = “” ) ( i = 2 , a = “b” , d = “” ) (d = “fedcb” ) * Private Sub Try(c As String, d As String) Dim a As String Static i As Integer
您可能关注的文档
最近下载
- 形势与政策(2024春)超星尔雅学习通章节测试答案.docx VIP
- 最新2023版知识产权贯标GBT29490 02知识产权法律法规及合规性评价控制程序(含表单)[知识产权合规管理体系文件].docx VIP
- 2025年山西政采专家培训后考试题库及答案最新.docx VIP
- 《工程勘察设计收费标准》(2002年修订本)-完整版-1.pdf VIP
- 2025湖北襄阳粮油集团有限公司招聘通过人员笔试历年参考题库附带答案详解.pdf
- 免费颁奖典礼晚会PPT模板 (8).pptx VIP
- 人教部编版八年级语文上册《采桑子》示范公开课教学课件.pptx VIP
- 2025年贵州省贵阳市【辅警协警】笔试预测试题(附答案).docx VIP
- 2025年浙教版七年级数学上册第二单元测(含答案)试卷 .pdf VIP
- ACP云计算复习测试卷含答案.doc
文档评论(0)