使用面向对象思想来实现 #include <iostream> #include <iomanip> using namespace std; class Trapezia { public: Trapezia(float up, float down, float height): _up(up), _down(down), _height(height){} float area() { return (_up + _down) * _height / 2; } private: float _up; float _down; float _height; }; i...