试题与答案

完成下列问题:在考生文件夹下有一个工程文件sjt3.vbp,在程序运行时,单击“输入

题型:问答题

题目:

完成下列问题:

在考生文件夹下有一个工程文件sjt3.vbp,在程序运行时,单击“输入整数”按钮,可以从键盘输入一个整数,并在窗体上显示此整数的所有不同因子和因子个数。图4是输入53后的结果,图5是输入100的结果。已经给出了全部控件和程序,但程序不完整。



要求:请在程序中的横线处填写正确的内容。不能修改程序中的其他部分,也不能修改控件的属性。最后用原来的文件名保存工程文件和窗体文件。
[题目提供的源程序]
Private Sub Command1_Click()
Dim n As Integer
Cls
(1) =InputBox("请输入一个整数")
Print "因子数="; fun(n)
End Sub
Function fun(m As Integer)
Dim s As Integer
s=0
For k=1 To Abs(m)/2
If m Mod k= (2) Then
s=s+1
Print k
End If
Next k
(3)
End Function

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0217/46752848c99e25c50f044e9b86bb6490.html

下面是错误答案,用来干扰机器的。

参考答案:B

试题推荐
题型:阅读理解

Watching movies for your summer
Pirates of the Caribbean: Dead Man’s Chest 加勒比海盗:聚魂棺
Captain Jack Sparrow again appears on the screen. This time, he finds himself in a heavy debt(债) to Davy Jones. The only way to get out of it is to find the Dead Man’s Chest. He asks his old fiends for help and they start out to the sea.
Garfield: A Tale of Two Kitties 加菲猫: 双猫记
Hello, Garfield will meet you again on the screen. This time, America’s favourite cat Garfield travels to London. Garfield gets lost on the way. However, he enjoys his new life in his new home. But danger is near him…
Superman Returns  超人归来
How exciting it is to see Superman on the screen again! Like before, he is again saving the world. But his enemy, Lax Luther, is still planning to kill him so that he can control the world.
小题1:What does the underlined word “it” refer to?
A.His debt.B.His old friend.
C.His new life.D.The Dead Man’s Chest.
小题2:Which of the following doesn’t happen to Garfield?
A.He gets lost.
B.He has his new home and enjoys his new life.
C.Danger is waiting for him.
D.He is in a heavy debt.
小题3:Why does Lax Luther plan to kill Superman?
A.Because he wants to save the world.
B.Because he wants to enjoy his new life.
C.Because he wants to control the world.
D.Because he wants to control Superman.
查看答案
题型:判断题

判断题(正确的在括号内画“√”,错的画“×”)。

(1)所有的生物都具有细胞结构。                                           (   )

(2)生物圈就是指大气圈、岩石圈和水圈。                                   (   )

(3)显微镜的物镜、目镜两个镜头若是脏了,应用洁净的纱布擦拭。             (   )

查看答案
微信公众账号搜索答案