有以下程序:
#include <iostream>
using namespace std;
#define PI 3.14
class Point
private:
int x,y;
public:
Point(int a,int b)
x=a;
y=b;
int getx()
return x;
int gety()
return y;
;
class Circle : public Point
private:
int r;
public:
Circle(int a,int b,int c):Point(a,b)
r=c;
int getr()
return r;
double area()
return PI*r*r;
;
int main()
Circle c1(5,7,10);
cout<<cl.area()<<endl;
return 0;
程序执行后的输出结果是
A.314
B.157
C.78.5
D.153.86