mdsk.net
当前位置:首页 >> privAtE suB Form_CliCk() Dim B As IntEgEr,y >>

privAtE suB Form_CliCk() Dim B As IntEgEr,y

private sub form_click() &&表单单击事件 Dim b As Integer,y As integer &&定义数组b为整型,y为整型 Call Mysub2(3,b) &&调用过程Mysub2,并传递参数3,b y=b:Call Mysub2(4,b) &&调用过程Mysub2,并传递参数4,b Print y+b &&输出Y+B的值 End Su...

定义静态变量,执行此过程时,该变量不会被初始化,而是保持上次调用此过程时的值。

a(1)=2 b(1)=2*2=4 a(2)=4 b(2)=4*2=8 a(3)=6 b(3)=6*2=12 a(4)=8 b(4)=16 for循环后i=5 b(5-2)=b(3)=12

X=3 Y=3 X=3 Y=6 X=3 Y=9 没看到在哪里定义Y 我就当全局变量了 如果没定义,则三次输出同第一次

NO. 1 3 NO. 2 5 NO. 3 2 NO. 4 1 NO. 5 1

Private Sub Command1_Click()Dim a(1 To 10) As IntegerDim i As IntegerFor i = 1 To 10a(i) = i * iiList1.AddItem Str(a(i))NextEnd Sub前面的循环结束的时候next I是11了,a最大才10,所以下标越界

第1题的输出结果是$$$ Tab[(n)]可选的 n 参数是在显示或打印列表中的下一个表达式之前移动的列数。 例如Print tab(10);"$",$将在第10列出现

答案1: Option Explicit Private Sub Form_click() Dim j As Integer For j = 13 To 17 If sushu(j) = True Then Print j & "是素数" End If Next j End Sub Private Function sushu(ByVal n As Long) As Boolean Dim i As Long For i = 2 To n...

把下面的代码复制到窗体的代码里,运行后单击窗体就可以了。 Private Sub Form_Click() Dim a() As Integer '空数组 Dim n As Integer Dim i As Integer Dim max As Integer '数组最大值下标 Dim min As Integer '数组最小值下标 Dim t As Integ...

答案是3,16

网站首页 | 网站地图
All rights reserved Powered by www.mdsk.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com