单项选择题

设有如下程序: Private Sub Command1_Click() Dim Sum As Double, x As Double sum=0 n = 0 For i= 1 To 5 x = n / i n = n + 1 sum=sum+x Next End Sub 该程序通过For循环计算一个表达式的值,这个表达式是

A.1+1/2+2/3+3/4+4/5
B.1+1/2+2/3+3/4
C.1/2+2/3+3/4+4/5
D.1+1/2+1/3+1/4+1/5
<上一题 目录 下一题>
热门 试题

单项选择题
用黑盒技术测试用例的方法之一为
A.因果图
B.逻辑覆盖
C.循环覆盖
D.基本路径测试
单项选择题
在窗体上画一个名称为Text1的文本框,要求文本框只能接收大写字母的输入。以下能实现该操作的事件过程是
A.Private Sub Text1_KeyPress(KeyAscii As Intege If Key Ascii<65 Or KeyAscii>90 Then MsgBox“请输入大写字母” KeyAscii=0 End If End Sub
B.Pfivate Sub Text1_KeyDown(KeyCode As Integer,Shift As Intege If KeyCode<65 Or KeyCode>90 Then MsgBox“请输入大写字母” KeyCode=0 End If End Sub
C.Private Sub Text1_MouseDown(Button As Integer,Shift As Integer,X As Single, Y As Singl If Asc(Text1.Tex<65 Or Asc(Text1.Tex>90 Then MsgBox“请输入大写字母” End If End Sub
D.Private Sub Text1_Change() If Asc(Text1.Tex>64 And Asc(Text1.Tex<91 Then MsgBox“请输入大写字母” End If End Sub
相关试题
  • 阅读程序: Option Base 1 Private S...
  • 数据库设计的根本目标是要解决
  • 在窗体上画两个单选按钮,名称分别为Option...
  • 为了使模块尽可能独立,要求