问题 单项选择题

(9)~(11)题使用下图,表单名为Form1,表单中有两个命令按钮(Command1和Command2)、两个标签、两个文本框(Text1和Text2)。


假设用户名和口令存储在自由表“口令表”中,当用户输入用户名和口令并单击“登录”按钮时,若用户名输入错误,则提示“用户名错误”;若用户名输入正确,而口令输入错误,则提示“口令错误”。若命令按钮“登录”的Click事件中的代码如下:
USE 口令表
GO TOP
flag=0
DO WHILE.not.EOF()
IF Alltrim(用户名)==Alltrim(Thisform.Text1.Value)
IF Alltrim(口令)==Alltrim(Thisform.Text2.Value)
WAIT“欢迎使用”WINDOW TIMEOUT2
ELSE
WAIT“口令错误”WINDOW TIMEOUT2
ENDIF
flag=l
EXIT
ENDIF
SKIP
ENDDO
IF______
WAIT“用户名错误”WINDOW TIMEOUT2
ENDIF
则在横线处应填写的代码是

答案

参考答案:B

解析: 从题干中的程序段中可以看出,flag变量起到了标志位的作用,用于标识用户是否正确地输入了用户名。 当用户名被正确输入的时候,会将变量flag的值置为1,否则为0。系统初始化时,flag变量的值被设置为0,表示用户名还没有被正确输入,如果用户输入了正确的用户名,程序将继续判断用户输入的密码是否正确,不管密码输入正确与否,,程序都会执行到语句flag=l,把变量flag的值设置为1,因此程序可以用flag的值来判断是否用户名被正确输入。最后对flag的值进行判断,如果flag的值为0,就是用户名没有被正确输入的情况。故选项B为正确答案。

填空题
完形填空

Read the following passage. Answer the questions according to the information given in the passage and the required words limit. Write your answers on your answer sheet.

The worst US economic recession (萧条) in 70 years is forcing senior citizens out of retirement, leaving them fighting for jobs in a weak labor market or risking homelessness.

A study by Experience Works, released on Tuesday, showed 46 percent of the 2,000 low income people over 55 years who participated needed to find work to keep their homes. Nearly half of them had been searching for work for more than a year.

“These people are at the age where they understandably thought their job-searching years were behind them,” said Cynthia Metzler, president and CEO of Experience Works.

“But here they are, many in their 60s, 70s and beyond, desperate to find work so they can keep a roof over their heads and food on the table.”

According to the study, many of the participants had no intention of working past their 60th birthday, but had to change plans after being dismissed or following the death of the partner. Over a third of the participants had retired.

Ninety percent of respondents 76 years and older planned to continue working for the next five years.

Huge medical bills due to a personal illness or that of a spouse(配偶) were also reasons for coming out of retirement, the survey found. The longest and deepest economic slump since the 1930s is making finding a job for the low-income elderly workers a difficult challenge.

The Experience Works study found that 46 percent of the elderly jobseekers were sometimes forced to choose between paying rent, buying food or medication. Almost three-quarters believed their age made it harder to compete for jobs with younger workers.

“This study underscores calls for the need to create policies that remove barriers to employment for older workers and provide additional programs and services specifically aimed at helping older people re-enter the work force or remain working,” said Metzler.

1. What has caused the American retired senior citizens back to work?  (No more than 8 words)

2. Why is it hard for the elderly job seekers to find a job?  (No more than 13 words)

3. Use several words to describe the possible feelings of the elderly job seekers? (No more than 4 words)

4. What might be the solution to the problem according to the study?  (No more than 15 words)