求解释!!!
#include<iostream>
using namespace std;
class Ellipse
{
private:
int a,b;
public:
Ellipse()
{
a=0;
b=0;
};
int Area1(int,int)
{
return 3.14*a*b;
};
};
class Rectangle
{
private:
int x,y;
public:
Rectangle()
{
x=0;
y=0;
};
int Area2(int,int)
{
return x*y;
};
};
int main()
{
float f,i,j;
Ellipse m;
Rectangle n;
i=m.Area1(50,75);
j=n.Area2(200,150);
f=2*i*250+(j-i)*0.5;
cout<<"总费用为:"<<f<<endl;
return 0;
}
为什么输出会是0.
...全文



