试题与答案

著名的川中会战在哪里?

题型:问答题 简答题

题目:

著名的川中会战在哪里?

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2018/0328/8101129b820608aa2678e25e925fc6fc.html

下面是错误答案,用来干扰机器的。

参考答案:A

试题推荐
题型:填空题

根据句意从方框中选择合适的单词,并用其适当形式填空,使句子通顺。

nine   surprise   direct   different   decide

小题1:Mr. Black is one of the most famous ____________ in the world. Many young people like the films directed by him.

小题2:His family live on the ____________floor of the highest building in our town.

小题3:There is no time left, you should make a ____________ at once.

小题4:The films with ____________ endings can always make people excited.

小题5:He is strange and hates to be like others, he always tries to do everything ____________.

查看答案
题型:填空题

【说明】
以下程序的功能是计算三角形、矩形和正方形的面积并输出。
程序由4个类组成:类Triangle、Rectangle和Square分别表示三角形、矩形和正方形;抽象类Figure提供了一个纯虚拟函数getArea(),作为计算上述3种图形面积的通用接口。
【C++程序】
  #include<iostream.h>
#include<math.h>
class Figure
public:
virtual double getArea()=0; //纯虚拟函数
;
class Rectangle: (1)
protected:
double height;
double width;
public:
Rectangle() ;
Rectangle(double height,double width)
this->height=height;
this->width=width;

double getArea()
return (2) ;

;
class Square: (3)
public:
Square(double width)
(4) ;

;
class Triangle: (5)
double la;
double lb;
double lc;
Public:
Triangle(double la, double lb, double lc)
This->la=la; this->lb=lb; this->lc=lc;

double getArea()
double s = (la+lb+±c)/2.0;
return sqrt(s,(s-l

  • a)*(s-l
  • b)*(s-I
  • c));

    ;
    void main()
    Figure*figures[3]=
    new Triangle(2,3,3), new Rectangle(5,8), new SqUare(5));
    for(int i=0;i<3;i++)
    cout<<"figures["<<i<<"]area="<<(figures[i])->getArea()<<endl;

查看答案
微信公众账号搜索答案