This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 1. 2. 创建一个名为 Rectangle 的类,具有成员变量 width 和 height,以及成员函数 double calculateArea() ,用于计算矩形的面积。
#include <iostream>
using namespace std;
class Rectangle
{
public:
double calculateArea()
return width * height;
}
int width, height;
};
int main()
return 0;