问题 填空题

阅读以下说明和C++代码,将应填入______处的字句写在对应栏内。
[说明]
现需要统计某企业员工的月平均工资,即该企业本月发给员工的工资总和除以员工数。假设企业本月发给员工的工资总和为sumSalary,该企业的员工总数为employeeNumber,下面的程序代码计算该企业员工本月的平均工资,其中需要处理employNumber为0的情况。
[C++代码]
#include <iostream>
using namespace std;
class Department
protected:
float average(float x,int y)
if(y==0)throw ______;
return x/y;

public:
void caculate(void)
float sumSalary;
int employeeNumber;
try
cout<<"请输入当月工资总和与员工数:"<<endl;
cin>>sumSalary>>employeeNumber;
float k=average(sumSalary,employeeNumber);
cout<<"平均工资:"<<k<<endl;

______(int e)
if(e==0)
cout<<"请重新输入当月工资总和与员工数:"<<endl;
cin>>sumSalary>>employeeNumber;
float k=average(sumSalary,employeeNumber);
cout<<"平均工资:"<<k<<endl;



;
void main()
try
______;
d.caculate();

______(int e)
if(e==0)
cout<<"程序未正确计算平均工资!"<<endl;


程序运行时,若输入的员工工资总和为6000,员工数为5,则屏幕输出为:
请输入当月工资总和与员工数:
6000 5
______
若程序运行时,第一次输入的员工工资总和为6000,员工数为0,第二次输入的员工工资总和为0,员工数为0,则屏幕输出为:
请输入当月工资总和与员工数:
6000 0
______
0 0
______

答案

参考答案:0或y

单项选择题
阅读理解

A student is learning to speak British English. He wonders: Can I communicate with Americans? Can they understand me? Learners of English often ask: What are the differences between British and American English? How important are these differences?

Certainly, there are some differences between British and American English. There are a few differences in grammar. For example, speakers of British English say “in hospital” and "Have you a pen?” , Americans say “in the hospital” and ‘Do you have a pen?’.Pronunciation is sometimes different. Americans usually sound theirs in words like “bird” and “hurt”. Speakers of British English do not sound theirs in these words. There are differences between British and American English in spelling and vocabulary. For example, “colour” and “honour” are British, “color” and “honor” are American.

These differences in grammar, pronunciation, spelling and vocabulary are not important, however. For the most part, British and American English are the same language.

小题1:According to this passage, a student who is learning to speak American English might be afraid that __________.

A.British people cannot understand him

B.American people cannot understand him

C.the grammar is too hard for him

D.the spelling is too hard for him小题2: American English and British English are different in __________.

A.spelling

B.pronunciation

C.grammar

D.all of the above小题3:What is NOT mentioned(提及) in the passage?

A.Whether there are differences between British English and American English.

B.Whether British English and American English are one language or two.

C.How the differences between British English and American English came about.

D.How important the differences are.小题4:Most __________ say “Do you have a watch?”

A.British people   

B.Americans

C.children

D.teachers小题5:According to this passage, British people and Americans have __________ difficulty in understanding each other.

A.little

B.much

C.some

D.great