正在加载图片...
B=B+1 C=C+1 A, B, C, D End sub 第一次单击 Commandl输出结果为 第二次单击 Command 1输出结果为 2.新建一个工程后,不对窗体的任何属性进行设置,在窗体的 Form load事件 中加入如下程序代码(2分)。 Private Sub Form Load O Dim s as inte Dim I As Integer S=0 For i=1 to 100 Next i Print s End sub 运行该程序后,窗体上显示的信息为 3.阅读以下程序段,写出X的值(2分) Private Sub Form Click DDA im a as int B As Integer, C As Integer, X As Integer m T As Integer If a< B Then A=B: B= T End if If b>c Then X=B Elself a>c then End if Print x End sub 运行该程序后,在窗体上打印的X的值为 4.在窗体上添加文本框控件 TextI并设置其Text属性为“5”,添加标签控件 Labell和命令按钮控件 Comamnd1,并针对 Commandl的 Click事件编制程序如下 (2分)。 Private Sub Commandl Click O Dim n As Integer Dim I As Integer Dim J As InteB=B+1 C=C+1 D=D+1 Print A, B, C, D End Sub 第一次单击 Command1 输出结果为: ________,_________,_________,________ 第二次单击 Command1 输出结果为: ________,_________,_________,________ 2.新建一个工程后,不对窗体的任何属性进行设置,在窗体的 Form_Load 事件 中加入如下程序代码(2 分)。 Private Sub Form_Load() Dim S As Integer Dim I As Integer S = 0 For I = 1 To 100 S = S + I Next I Print S End Sub 运行该程序后,窗体上显示的信息为________________ 3.阅读以下程序段,写出 X 的值(2 分) Private Sub Form_Click() Dim A As Integer, B As Integer, C As Integer, X As Integer Dim T As Integer A = 9: B = 4: C = 8 If A < B Then T = A: A = B: B = T End If If B > C Then X = B ElseIf A > C Then X = C Else X = A End If Print X End Sub 运行该程序后,在窗体上打印的 X 的值为__________ 4.在窗体上添加文本框控件 Text1 并设置其 Text 属性为“5”,添加标签控件 Label1 和命令按钮控件 Comamnd1,并针对 Command1 的 Click 事件编制程序如下 (2 分)。 Private Sub Command1_Click() Dim N As Integer Dim I As Integer Dim J As Integer
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有