题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-12 18:44:38

[单项选择]在窗体上有一个命令按钮,然后编写如下事件过程。
Private Sub Command1_Click( )
Dim a(5)As String
FOR i=1 To 5
a(i)=Chr(Asc("A")+(i-1))
Next
For Each b h a
Print b;
Next
End Sub
程序运行后,单击命令按钮,输出结果是
A. ABCDE
B. 1 2 3 4 5
C. abcde
D. 出错信息

更多"在窗体上有一个命令按钮,然后编写如下事件过程。 Private Su"的相关试题:

[单项选择]在窗体上有一个命令按钮,然后编写如下事件过程  Private Sub Command1 _ cickc ( )    a=InputBox("enter the first integer")    b=InputBox("enter the second integer")    Print b + a  End Sub  程序运行后,单击命令按钮,先后在两个输入框中分别输入“2”和“6”,则输出结果为

A. 2
B. 62
C. 8
D. 26
[单项选择]在窗体上有一个命令按钮,然后编写如下事件过程:
Private Sub Command1_Click( )
Dim a(5)As String
FOR i=1 To 5
a(i):Chr(Asc(“A“)+(i-1))
Next
For Each b In a
Printb:
Next
End Sub
程序运行后,单击命令按钮,输出结果是( )。
A. ABCDE
B. 12345
C. abcde
D. 出错信息
[单项选择]在窗体上有一个命令按钮Command1,编写下列程序: Private Sub Command1_Click( ) Print pp1(3,7) End Sub Public Function pp1(x As Single,n As Integer)As Single If n=0 Then pp1=1 Else If n Mod 2=1 Then pp1=x*x+n Else pp1=x*x-n End If End If End Function 程序运行后,单击该命令按钮,屏幕上显示的是( )。
A. 2
B. 1
C. 0
D. 16
[单项选择]在窗体上有一个命令按钮Command1,编写事件代码如下: Private Sub Command1_Click( ) Dim d1 As Date Dim d2 As Date d1=#12/25/2009# d2=#1/5/2010# MsgBox DateDiff("ww",d1,d2) End Sub 打开窗体运行后,单击命令按钮,消息框中输m的结果是( )。
A. 1
B. 2
C. 10
D. 11
[单项选择]在窗体上有一个命令按钮Command1,编写事件代码如下。
Private Sub Command1_Click( )
Dim x As Integer,y As Integer
x=12:y=32
Call Proc(x,y)
Debug.Print x;y
End Sub
Public Sub Proc(n As Integer,ByVal m As Integer)
n=n Mod 10
m=m Mod 10
End Sub
打开窗体运行后,单击命令按钮,立即窗口上输出的结果是( )。
A. 2 32
B. 12 3
C. 2 2
D. 12 32
[填空题]在窗体上有一个命令按钮和一个文本框。编写如下事件过程: Private Sub Command1_Click( ) a=InputBox("请输入一个整数") Text1.Text=a If a > 0 Then If a Mod 3 = 0 Then MsgBox "True" Else MsgBox "error" End If End If End Sub 程序运行后,单击命令按钮,在输入对话框里输入12,则弹出的提示内容是______。
[单项选择]在窗体上有一个命令按钮Command1,编写如下程序:
Private Sub Command1_Click( )
Print pp1(3,7)
End Sub
Public Function pp1(x As Single,n As Integer)As Single
If n=0 Then
pp1=1
Else
If n Mod 2=1 Then
pp1=x*x+n
Else
pp1=x*x-n
End If
End If
End Function
程序运行后,单击该命令按钮,屏幕上显示的是( )。
A. 2
B. 1
C. 0
D. 16

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码