1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
YDCX_Ti Ti_H Ti_Mu Re_ABCD Result 1 在窗体模块中编写以下Function过程和窗体Click事件过程 Private Function CommFun(n As Integer)As Integer Dim I As Integer S=1 For i=1 To n s=s*i Next i CommFun=s End Function Private Sub Form_Click() Dim Sum As Integer Dim K As Integer sum=0 For k=1 To 3 sum=sum+CommFun(k) Next k Print sum End sub 当程序运行时,在窗体中单击鼠标左键时,则程序的输出结果是( )。 9 2 在窗体模块中编写以下Sub过程和窗体Click事件过程 Private Sub suba(x As Integer , y As Integer) Dim t As Integer t=x: x=y: y=t End Sub Private Sub Form_Click() Dim a As Integer,b As Integer a=10:b=20 Call suba(a,b) Print a;b; Call suba(b,a) Print a;b End Sub 当程序运行时,在窗体中单击左键时,则程序的输出结果是( )。 20 10 10 20 3 在窗体模块中编写以下Function过程和窗体Click事件过程 Private Function funa(x As Integer) As Integer Static s As Integer s=s+x funa=funb(s) End Function Private Function funb(y As Integer)As Integer Static sum As Integer sum=sum+y funb=sum End Function Private Sub Form_Click() Dim acc As Integer ,i As Integer acc=0 For i=1 to 3 acc=acc+funa(i) Next i Print acc End Sub 当程序运行时,在窗体中单击左键时,则程序的输出结果是 ( )。 15 4 在窗体模块中编写以下Sub过程和窗体Click事件过程 Private Sub sub1(ByVal a As Integer,b As Integer) a=a+b b=a+b End Sub Private Sub Form_Click() Dim x As Integer ,y As Integer x=10:y=20 Call sub1(x,y) sub1 x,y Print x;y End Sub 当程序运行时,在窗体中单击左键时,则程序的输出结果是( )。 10 110 5 在窗体中添加一个文本框(名称为Text1)和一个命令按钮(名称为Command1), 编写Command1的Click事件过程和通用过程mysub,代码如下: Private sub mysub(pal As String,a As Integer,b As Integer) Dim str As String ,n As Integer,i As Integer n=Len(Trim(pal)) For i=1 to n If Mid(pal,i,1)=A And Mid(pal,i,1)=Z Then a=a+1 ElseIf Mid(pal,i,1)=0 And Mid(pal ,i,1)=9 Then B=b+1 End If Next i End Sub Private Sub Command1_Click() Dim x As Integer ,y As Integer x=0:y=0 Call mysub(Text1.text,x,y) Print x;y End Sub 程序运行过程中,当在Text1文本框中输入:There are 12 student studying VB,然后 单击命令按钮时,则程序的输出结果为 ( )。 3 2 6 在窗体模块中编写以下Sub过程和窗体Click事件过程 Private Sub sub1(arr() As Integer , ByVal n As Integer) For i=1 To 5 arr(i)=i^n Next i End Sub Private Sub form_click() Dim a(1 To 5) As Integer ,i As Integer Call

文档评论(0)

mv2323 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档