# include
# include
# define PI 3.14
using namespace std;
The class Point {
Public:
Void Input ();
Void the show ();
Double x, y;
};
The void Point: : Input ()
{
Cout<& lt;" The x coordinate: "; Cin> x;
Cout<& lt;" Y coordinates: "; Cin> y;
}
The void Point: : show ()
{
Cout<& lt;" (x, y) is: "& lt; & lt;" (" & lt;
//round information values:
The class Circle: public Point
{
Public:
Void banjing ();
Void zhouchang ();
Void mianji ();
Double r;
Double C;
Double S;
//protected:
//double r;
};
Void Circle: : banjing ()
{
The Input ();
R=SQRT (* x) (x + y) (y *);
//cout<& lt;" The radius of the circle is: "& lt;
Void Circle: : zhouchang ()
{
C=2 * PI * r;
Cout<& lt;" Circumference is: "& lt;
Void Circle: : mianji ()
{
S=PI * r * r;
Cout<& lt;" The area of a circle is: "& lt;
//cylinder of information value:
The class Cylinder: public Circle
{
Public:
Void Input_h ()
{
Cout<& lt;" Height is: "; Cin> h;
}
Void biaomianji ()
{Input_h ();
S_biao=(2 * PI * r * h) + (2 * PI * r * r);
Cout<& lt;" Cylindrical surface area is: "& lt;
Void tiji ()
{
V=PI * r * r * h;
Cout<& lt;" The volume of a cylinder is: "& lt;
//void Input_h ();
//void biaomianji ();
//void tiji ();
Private:
Double h, V, S_biao;
};
Int main ()
{
Circle c1;
C1. Banjing ();
C1. Zhouchang ();
C1. Mianji ();
Cylinder a1.
//a1. Input_h ();
A1. Biaomianji ();
A1. Tiji ();
return 0;
}
CodePudding user response:
Say first show what wrong,CodePudding user response:
Don't tell me what demand function,