Part B
Below is a table showing the bus and the subway as means of city traffic. Look at the table and write an essay about 120 words making reference to the following points:
1. a comparison between the bus and subway by using the features given
2. the advantages and disadvantages of the two transportation tools
3. your proposal of means of city traffic
查看答案
No matter what the methods we use, the final result is that we will need to decrease CO2emissions by 70% to 0% simply to stabilize ______.
文中“我又暗暗为这座辉煌建筑的废墟历经漫长的风雨得以保存至今而庆幸”一句在文中有什么作用?
阅读以下说明和C程序代码,将应填入______处的语句写在答题纸的对应栏内。
[说明]
函数MultibaseOutput(long n,int B)的功能是:将一个无符号十进制整数n转换成 B(2≤B≤16)进制数并输出。该函数先将转换过程中得到的各位数字入栈,转换结束后再把B进制数从栈中输出。有关栈操作的诸函数功能见相应函数中的注释。C代码中的符号常量及栈的类型定义如下:
define MAXSIZE 32
typedef struct{
int * elem; /* 栈的存储区 */
int max; /* 栈的容量,即栈中最多能存放的元素个数 */
int top; /* 栈顶指针 */
}Stack;
[C代码]
int InitStack(Stack * S,int n) / * 创建容量为n的空栈 */
{ S->elem=(int *)malloc(n * sizeof(int));
if(S->elem==NULL)return-1;
S->max=n; (1)=O;return 0;
}
int Push(Stack * S,int item) / * 将整数item压入栈顶 * /
{ if(S->top==S->max){ printf(“Stack is full! \n”);return-1;}
(2)=item;return 0;
}
int StackEmpty(StackS) {return (! S.top)? 1:0;} / * 判断栈是否为空 * /
int Pop(Stack *S ) / * 栈顶元素出栈 * /
{ if(! S->top){printf(“Pop an empty stack! \n”);return-1;}
return (3);
}
void MultibaseOutput(long n,int B)
{ int m;StackS;
if (InitStack(&S,MAXSIZE)){printf(“Failure! \n”);return;}
do {
if(Push(&S, (4) )){printf(“Failure! \n”);return;}
n=(5);
}while(n!=0);
while(! StackEmpty(S)){ / * 输出B进制的数 * /
m=Pop(&S);
if(m<10)printf(“%d”,m); / * 小于10,输出数字 * /
else printf(“%c”,m+55); / * 大于或等于10,输出相应的字符 * /
}
printf(“\n”);
}
阅读以下应用说明及Visual Basic程序代码,将应真入______处的语句写在答题纸的对应栏内。
[应用说明5.1]
应用程序的窗体中有1个下拉式列表框(名称为Combol)和2个文本框(名称分别为Txt1和Txt2)。运行时,用户从Combo1的列表中进行选择,程序就会将选中条目的内容及编号(从0开始)分别在文本框Txt1和Txt2中显示出来。
[程序代码5.1]
Private Sub Combol_Click()
Txt1,Text=Combol. (1)
Txt2.Text=Combol. (2)
End Sub
(注意:可供(2)处选择的选项有List,Index,ListIndex,LisCount,Number)
[应用说明5.2]
本应用程序的运行窗口如图2-1所示。
当用户在输入框(名为TxtIn)中输入数值数据,并从下拉式列表框(名称为CmbOp)中选择所需的运算后,输出框(名为TxtOut)中就会显示运算的结果。用户单击“清除”按钮(名为CmdClear)后,输入框和输出框都清空。
[程序代码5.2]
Private Sub CmbOp_Click()
Dim DataIn As Double,DataOut as Double
DataIn=(3)
Select Case (4)
Case“取整数部分”
DataOut=Int(DataIn)
Case“求平方根”
If DataIn<0 Then
MsgBox$(“负数不能开平方!”
Else
DataOut=Sqr(DataIn)
End If
Case“取绝对值”
DataOut=Abs(DataIn)
(5)
TxtOut.Text=str$(DataOut)
End Sub