题目
在下面程序的横线处填上适当的语句,使该程序的执行结果为200.
#include
class number{
private:
int val;
public:
number(int i){val=i;}
____________int();
} ;
number::operator int(){___________}
class num:public number{
public:
num(int i):number(i){}
};
void main(){
num n(100);
int i =n;
_____________
}
#include
class number{
private:
int val;
public:
number(int i){val=i;}
____________int();
} ;
number::operator int(){___________}
class num:public number{
public:
num(int i):number(i){}
};
void main(){
num n(100);
int i =n;
_____________
}
提问时间:2021-04-01
答案
#includeclass number{private:int val;public:number(int i){val=i;}operator int(); // 填空1} ;number::operator int(){return val *= 2;} //填空2class num:public number{public:num(int i...
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
最新试题
- 1[单选]The box is too heavy for me to carry.Jack offers____me____the box.
- 2已知圆的半径为1,OA垂直L于A,若点O(0,0),A(2,0)则圆上的点到直线L的距离的最大直为()
- 3已知抛物线y=ax2+bx+c与抛物线y=1/2x2+1的形状相同,它的对称轴是x=-2,它与x轴的两个交点之间的距离为2.
- 4medicine是可数名词,还是不可数名词
- 5It was because of bad weather___the football match had to be put off.
- 61.老师进来的时候同学们假装正在看书 The students_____ _____ ____ _____when the teacher came in.
- 7to sit still 意思
- 850*50方钢管国标厚度是多少,厚度偏差是多少
- 9如何保存亚铁盐溶液,防止其被氧化,为什么?
- 10She does homework at school.变否定句
热门考点
- 128X(960÷165)= 用简便方法计算
- 2非洲北部亚洲西部和印度分布什么人种
- 3Mr.white is [ ].he works in new york.; American;China
- 4学校合唱队共有队员96人,其中女队员的人数是男队员人数的140%,合唱队男,女队员各有多少人?
- 5I often read book in the library___ in the afternoon (late later)
- 6已知函数f(x)=3sin(2x-π6)+2sin2(x-π12) (1)求函数f(x)的最小正周期; (2)求使函数f(x)取得最大值时x的集合.
- 7英语造句(初三)
- 8大一高数极限
- 9有三个质数,它们的乘积是1001,这三个质数各是多少?
- 10河里的浪那么大,小小的芦叶船,怎么会翻不了呢?换一种说法使句子意思不变