33.设有如下程序Private Sub Command1_Click( )Dim sum As Double,x As Doublesum = 0n = 0For i=1 To 5x = n / in = n + 1sum = sum + xNext iEnd Sub该程序通过For循环来计算一个表达式的值,这个表达式是______.A、1+1/2+2/3+3/4+4/5 B

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/28 13:59:19
33.设有如下程序PrivateSubCommand1_Click()DimsumAsDouble,xAsDoublesum=0n=0Fori=1To5x=n/in=n+1sum=sum+xNexti

33.设有如下程序Private Sub Command1_Click( )Dim sum As Double,x As Doublesum = 0n = 0For i=1 To 5x = n / in = n + 1sum = sum + xNext iEnd Sub该程序通过For循环来计算一个表达式的值,这个表达式是______.A、1+1/2+2/3+3/4+4/5 B
33.设有如下程序
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 i
End Sub
该程序通过For循环来计算一个表达式的值,这个表达式是______.
A、1+1/2+2/3+3/4+4/5 B、1+1/2+1/3+1/4+1/5
C、1/2+2/3+3/4+4/5 D、1/2+1/3+1/4+1/5

33.设有如下程序Private Sub Command1_Click( )Dim sum As Double,x As Doublesum = 0n = 0For i=1 To 5x = n / in = n + 1sum = sum + xNext iEnd Sub该程序通过For循环来计算一个表达式的值,这个表达式是______.A、1+1/2+2/3+3/4+4/5 B
选C,是个循环过程
从n=0 i=1开始,即第一个x=0/1=0
你n+1=1 然后i=2 x=1/2
...
循环到5 结束.

33.设有如下程序Private Sub Command1_Click( )Dim sum As Double,x As Doublesum = 0n = 0For i=1 To 5x = n / in = n + 1sum = sum + xNext iEnd Sub该程序通过For循环来计算一个表达式的值,这个表达式是______.A、1+1/2+2/3+3/4+4/5 B 怎么编写如下程序作业题private SUB Conmmd1_CLICK()___________A=_________FOR I =1TO5PRINT SPACE(6-I): ______________NEXTIEND SUB程序运行后,单击命令按钮 输出结果为 5 456 34567 2345678123456789 Private Sub 与 Sub的区别 xiexie在窗体上画两个文本框和一个命令按扭,然后程序如下:Private Sub Command1_Click()Dim x As Integer,n As Integerx = 1n = 0Do While x < 20x = x * 3n = n + 1LoopText1.Text = Str(x)Text2.Text = Str(n)End Sub程序运行后,单击 access下面程序运行后输出的是 Private Sub Form_Click() For i=1 To 4 x=1 For j=1 To 3 x=3 For k=1 To看不懂啥意思,谁能帮我说下每一步是什么意思,怎么得到答案的33.下面程序运行后输出的是Private Sub Form_Click 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:Private Sub Command1_Click() x = -5 If Sgn(x) Then y = Sgn(x ^ 2) Else y = Sgn(x) End If Print y End Sub 程序运行后,单击命令按钮,窗体上显示的是 A 6.分析下列程序,单击窗口时,程序运行结果.Private Function Fac() As StringFac = “,”End FunctionPrivate Sub Form_Click()Dim I as IntegerFor I=1 to 5Command1_ClickPrint Fac();Command2_ClickNext IEnd SubPrivate Sub Command1_Click()Prin 请问以下两道VB题目怎么做1.单击分解按钮,程序提示输入一个大于2的整数,并将该数分解为因数的乘积,代码如下Private Sub Command1_Click() Dim n As Integer, Factor As Integer Dim First As Boolean Do n 我用vb写了一个计算长方形~正方形或三角形面积的程序~代码如下~怎样修改啊~Private Sub Command1_Click()Dim a As StringDim h,l,s As Singlea = InputBox(请输入形状(只限于长方形~正方形或三角形),请输 VB编程问题.如何让计算出的100以内的勾股数的计算结果显示在List中?现在编的程序如下:Private Sub Command1_Click()Dim a,b,c As DoubleFor a = 1 To 100For b = a To 100c = Sqr(a * a + b * b)If c = Fix(c) And c vb 复选框用Check1.Value = Checked的时候就自动运行了Check1_Click.怎么办?程序如图代码如下:Private Sub Check1_Click()If Check1.Value = 1 ThenFor i = 0 To 39Check2(i).Value = 1Next iElseIf Check1.Value = 0 ThenFor i = 0 To 39Che Private Sub Form_Click()和Private Sub Command1_Click()有什么区别?什么时候用Form?什么时候用Command Private Sub Form_click()得到一组随机变量,怎样用到Private Sub Command1_Click()中去啊 设有如下程序段:int a=2,b=1,c=3; if(a 设有如下矩阵A和矩阵B,编写程序实现A+B. vb sgn 函数Private Sub Command1_Click()x = -5If Sgn(x) Theny = Sgn(x ^ 2)Elsey = Sgn(x)End IfPrint yEnd Sub程序结果是?这个里的x是怎么赋值的? vb 计算90°角正弦结果为 .893996663600558程序是这样,Private Sub Command1_Click()Dim a As Singlea = CSng(Text1.Text)MsgBox 计算结果为: & Sin(a)End Sub Private Sub Book(x As Integer)x=x * 2 + 1If x < 6 ThenCall Book(x)End Ifx=x * 2 + 1Print x;End SubPrivate Sub Command2_Click()Book 2End SubA) 23 47 B) 10 36C) 22 44 D) 24 5030) 单击命令按钮时,下列程序的执行结果为Private Sub Command1_