下列程序的执行结果为 【13】
#include <iostream. h>
class Point

public:
Point(double i, double j) x=i; y=j;
double Area( ) const return 0.0;
private:
double x, y;
;
class Rectangle: public Point

public:
Rectangle(double i, double j, double k, double 1)
double Area( ) const return w * h;
private:
double w, h;
;
Rectangle: :Rectangle(double i, double j, double k. double 1): Point(i,j).

w=k, h=1

void fun(Point &s)

cout<<s. Area( )<<end1;

void main( )

Rectangle rec(3.0, 5.2, 15.0. 25.0);
fun(rec)

题库:计算机等级考试 类型:填空题 时间:2017-07-03 15:52:10 免费下载:《填空》Word试卷

下列程序的执行结果为 【13】
#include <iostream. h>
class Point

public:
Point(double i, double j) x=i; y=j;
double Area( ) const return 0.0;
private:
double x, y;
;
class Rectangle: public Point

public:
Rectangle(double i, double j, double k, double 1)
double Area( ) const return w * h;
private:
double w, h;
;
Rectangle: :Rectangle(double i, double j, double k. double 1): Point(i,j).

w=k, h=1

void fun(Point &s)

cout<<s. Area( )<<end1;

void main( )

Rectangle rec(3.0, 5.2, 15.0. 25.0);
fun(rec)

下列程序的执行结果为 【13】 。    #include <iostream. h>    class Point        public:

本题关键词:行为结果,行为结果评价,道德行为效果,H型结构,竣工结算程序,执业资格行为,行政诉讼程序,结果,工程行为识别,行为过程评价;

微信扫码获取答案解析
下载APP查看答案解析