问题 填空题

在窗体上有一个“背景色变换”按钮和一个“结束”按钮。单击“背景色变换”按钮,背景色变为红色;再单击,背景色变为绿色;再单击,背景色变为蓝色;再单击背景色变为红色……如此循环。单击“结束”按钮,程序运行结束。请填空。
  Private Sub cmdChange_Click()
   If Mark=0 Then
     【13】 
    Mark=1
    ElseIf 【14】 Then
    Forml.BackColor=vbGreen
    Mark=2
    ElseIf Mark=2 Then
    Form1.BackColor;vbBlue
     【15】 
   End If
  End Sub
  Private Sub cmdExit_Click()
   End
  End Sub

答案

参考答案:【13】Form1.BackColor = vbRed
【14】Mark=1
【15】Mark=0

解析:【命题目的】考核条件控制语句的使用方法。
【解题要点】首先过程中定义了一个模块级整型变量Mark,每次都保留上次运行后的值。由程序可以看出:本题约定Mark等于0表示背景色为红色;Mark等于1表示背景色为绿色;Mark等于2表示背景色为蓝色,每次单击运行后要将Mark变为下次运行时的值,以便符合题目要求。所以【13】应为Form1.BackColor= vbRed,【14】为Mark=1;当背景色变为蓝色后再单击背景色要变为红色,所以应将Mark变为0,所以【15】为Mark=0。
【考点链接】多分支控制语句。

单项选择题
单项选择题

Throughout the 19th century and into the 20th, citizens of the United States maintained a bias against big cities. Most lived on farms and in small towns and believed cities to be centres of (1) , crime, poverty and moral (2) Their distrust was caused, (3) , by a national ideology that (4) farming the greatest occupation and rural living (5) to urban living. This attitude (6) even as the number of urban dwellers increased and cities became an essential (7) of the national landscape. Gradually, economic reality overcame ideology. Thousands (8) the precarious (不稳定的) life on the farm for more secure and better paying jobs in the city. But when these people (9) from the countryside, they carried their fears and suspicions with them. These new urbanities, already convinced that cities were (10) with great problems, eagerly (11) the progressive reforms that promised to bring order out of the (12) of the city.

One of many reforms came (13) the area of public utilities. Water and sewerage systems were usually operated by (14) governments, but the gas and electric networks were privately owned. Reformers feared that the privately owned utility companies would (15) exorbitant (过渡的) rates for these essential services and (16) them only to people who could afford them. Some city and state governments responded by (17) the utility companies, but a number of cities began to supply these services themselves. (18) of these reforms argued that public ownership and regulation would (19) widespread access to these utilities and guarantee a (20) price.

14()

A.public

B.municipal

C.republican

D.national