快捷导航

面积和周长得出的结果是错的,怎么改

#include
#include
using namespace std;
class Rectangle
{
double length;
double wide;
public:
void Set_lengthandwide(double a,double b)
{length=a,wide=b;}
double Get_Girth()
{ return length+length+wide+wide;}
double Get_Area()
{ return length*wide;}
};
int main()
{
Rectangle A;
double a,b;
A.Set_lengthandwide(a,b);
    cout > a >> b;
cout

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP