问题 填空题

在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1 Click() Do While b>=0 a=Val(InputBox("请输入a的值")) b=Val(InputBox("请输入b的值")) c=a+b Loop MsgBox c End Sub 程序运行后,依次输入3,2,1,0,-1,-2,则输出结果是______。

答案

参考答案:-3

解析: 本题考查VBA中循环的知识。对于这种循环结构,首先看条件判断是在循环体的前面还是后面,如果是先判断条件,则有可能一次也不执行循环体;如果是后判断条件,则无论条件如何至少执行一次循环体。在 Until循环中条件为False时执行循环体;条件为True时退出循环;在While循环中条件为True时执行循环体,条件为False时退出循环,这一点要注意区分清楚。本题是一个先判断条件的While循环,每次循环中有两次输入,共循环3次;由于在每次循环中均会重新对a、b、c进行赋值,所以只需要考虑最后一次循环就可以,在最后一次循环中c等于最后两次输入的值之和也就是-3。

单项选择题 A型题
单项选择题

Analysts have their go at humor, and I have read some of this interpretative literature, (1) without being greatly instructed. Humor can be (2) , (3) a frog can, but the thing dies in the process and the innards are (4) to any but the pure scientific mind.

One of the things (5) said about humorists is that they are really very sad ’people clowns with a breaking heart. There is some truth in it, but it is badly (6) . It would be more (7) , I think, to say that there is a deep vein of melancholy running through everyone’s life and that the humorist, perhaps more (8) of it than some others, compensates for it actively and (9) Humorists fatten on troubles. They have always made trouble (10) They struggle along with a good will and endure pain (11) , knowing how well it will (12) them in the sweet by and by. You find them wrestling with foreign languages, fighting folding ironing hoards and’ swollen drainpipes, suffering the terrible (13) of tight boots. They pour out their sorrows profitably, in a (14) of what is not quite fiction nor quite fact either. Beneath the sparking surface of these dilemmas flows the p (15) of human woe.

Practically everyone is a manic depressive of sorts, with his up moments and his down moments, and you certainly don’t have to be a humorist to (16) the sadness of situation and mood. But there is often a rather fine line between laughing and crying, and if a humorous piece of writing brings a person to the point (17) his emotional responses are untrustworthy and seem likely to break over into the opposite realm, it is (18) humor, like poetry, has an extra content, it plays (19) to the big hot fire which is Truth, and sometimes the reader feels the (20) .

6()

A.consulted

B.commented

C.remarked

D.stated