假定有如下的Sub过程:Sub fun(x As Single, y As Single)t = xx = t / yy = t Mod yEnd Sub在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim a As SingleDim b As Singlea = 6b = 4fun a, bPrint a, bEnd Sub程序运行后,单击命令按钮,输出结果为( )。
![](/upload/20220827/c85071da6ff0aadc10ebce6c25bb4f0d.png)
相似题目
-
有如下函数过程: Function secproc(x As Integer, y As Integer, z As Integer) secproc = 3 * y + z + 2 * x End Function Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a = 2: b = 3: c = 4 Print secproc(c, b, a) End Sub 该程序的运行结果是( )。
-
在窗体上画一个名称为Label1的标签,然后编写如下事件过程:Private Sub Form_Click()Dim S As IntegerS = 0For i = 1 To 15x = 2 * i - 1If x Mod 3 = 0 ThenS = S + 1End IfNext iLabel1.Caption = SEnd Sub运行程序,单击窗体,标签中显示的是________。
-
执行下列程序后,输出的结果是: Function Fun1(ByVal a As Integer, b As Integer) As Integer Dim t As Integer t = a - b b = t + a Fun1 = t + b End Function Private Sub Command1_Click() Dim x As Integer x = 10 Print Fun1(Fun1(x, (Fun1(x, x - 1))), x - 1) End Sub
-
在窗体上画一个名称为Label1的标签,然后编写如下事件过程:Private Sub Form_Click()Dim S As IntegerS = 0For i = 1 To 15x = 2 * i - 1If x Mod 3 = 0 ThenS = S + 1End IfNext iLabel1.Caption = SEnd Sub运行程序,单击窗体,标签中显示的是________。
-
有如下函数过程:Function secproc(x As Integer, y As Integer, z As Integer)secproc = 3 * y + z + 2 * xEnd FunctionPrivate Sub Command1_Click()Dim a As Integer, b As Integer, c As Integera = 2: b = 3: c = 4Print secproc(c, b, a)End Sub该程序的运行结果是( )。
-
求1!+2!+……+10!的程序如下: Private Function s(x As Integer) f=1 For i=1 To x f=f*i Next s=f End Function Private Sub Command1_Click() Dim i As Integer Dim y As Long For i=1 To 10 _____________ Next Print y End Sub
-
程序中有两个过程 Private Sub Fun1(S As String)和Private Sub Fun2(a() As String*6),在调用过程中用Dim St(6) As String*6定义了一个字符串数组。下面调用语句中正确的是 ______。 ①Call Fun1(St(3)) ②Call Fun2(St) ③Call Fun1(St) ④Call Fun2(St(6))
-
假定有如下的Sub过程:Sub Sub1 (x As Single, y As Single)t=xx = t/yy = t Mod yEnd Sub在窗体
-
有如下事件过程:Prirate Sub Form_Click()A$="123": B$="456"x=Val(A$)+Val(B$)Print x\100End S
-
编写如下事件过程;Private Sub Form_ MouseDown (Button As Integer, Shift As Integer, X As Si
-
设有如下通用过程:Public Sub Fun(a(),ByVal x As Integer)For i=1 To 5 x=x+a(i)NextEnd Sub在
-
假定有如下的Sub过程:Sub S(x As Single,y As Single)t=xx=t/yy=t Mod y End Sub在窗体上画一个
-
编写如下事件过程:Private Sub Form-MouseDown(Button As Integer,Shift As Integer,X As Single
-
设有一个命令按钮Command1的事件过程以及一个函数过程。程序如下: Private Sub Command1 Click() Static x A S Integer x=f(x+5) Cls Print X End Sub Private Function f(x As Integer)As Integer f=x+x End Function 连续单击命令按钮3次,第3次单击命令按钮后,窗体显示的计算结果是()。
-
设有如下通用过程:Public Sub Fun(a()As Integer,x As Integer) For i=1 To 5 x=x+a(i) Next
-
编写如下事件过程;Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X AS Single
-
设有如下通用过程:Public Sub Fun(a(), ByVal x As Integer)For i=1 To 5x=x+a(i)NextEnd Sub在
-
假定有如下的Sub过程:Sub sfun(x AsSingle,y AsSingle)t=xx=t/yy=t Mod yEnd Sub在窗体上添加一
-
下列程序的功能是计算两个自然数的最大公约数,界面如下图所示。给定的程序不完整,将程序补充完整。 Private Sub Command1_Click() Dim x As Long, y As Long,i As Long x=Val(Text1.Text) y=Val(Text2.Text) Text3.Text = Str(【13】 ) End Sub Function fun1(a As
-
在窗体上有一个名称为Command1的命令按钮,并有如下事件过程和函数过程: Private Sub Command1_Click() Dim p as Integer p=m(1)+m(2)+m(3) Print p End Sub Private Function m(n As Integer) As Integer Static s As Integer For k=1 To n s=s+1
-
在窗体上画一个名称为Command1的命令按钮和两个名称分别为Text1、Text2的文本框,如图5所示,然后编写如下程序: Function Fun(x As Integer, ByVal y As Integer) As Integer x=x+y If x<0 Then Fun=x Else Fun=y End If End Function Private Sub Command1_Cli
-
在窗体上有1个名称为Command1的命令按钮,并有如下事件过程和函数过程: Private Sub Command1_Click() Dim p As Integer p=m(1)+m(2)+m(3) Print p End Sub Private Function m(n As Integer)As Integer Static s As Integer Fork=1 To n s=s+1 N
-
有如下函数过程: Function Fun(By Val x As Ingeger,ByVal y As Integer) As Integer DO While …y<>0 reminder=x Mod y x=y y=reminder Loop Fun=x End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click() Dim
-
在窗体上画一个名称为Command1的命令按钮和两个名称分别为Text1、Text2的文本框,然后编写如下程序: Function Fun(x As Integer, ByValy As Integer)As Integer x=x+y If x<0 Then Fun=X Else Fun=y End If End Function Private Sub Command1_Click() Dim
推荐题目
- 集成电路版图包含了哪些信息数据?
- 当金融机构发现恐怖活动组织及恐怖活动人员拥有或者控制的资产,应当首先采取上调客户风险等级措施。
- 根据《中华人民共和国人民警察使用警械和武器条例》的规定,犯罪分子携带枪支拒捕,经警告无效的,人民警察()。
- 在寒冷的冬天,大雪过后我们通常会看到路面上被撒上一层盐,这样做能够加速融雪。这是因为()。
- 管理员对于村民的意见如果解决不了,应怎么办?
- 信息的科学概念应该从本体论层次和认识论层次两个层面出发进行理解。
- 企业财产的全面清查必须是定期进行,局部清查则根据需要不定期清查。
- 碾压混凝土不能用坍落度衡量其流动性。
- 机组虽不需立即停运,但需在6h以内停运的状态属于第()类非计划停运?
- Windows将整个计算机显示屏幕看作是( )。