C/C++

Помогите плиз с задачкой.

 #include  
#include
#include
#include
#include

using namespace std;

class Point {
public:
Point()
: x(0), y(0) {}
Point(const double x, const double y)
: x(x), y(y) {}
double length(const Point& p)const {
return sqrt(pow(p.x - x, 2) + pow(p.y - y, 2));
}
private:
double x;
double y;
};

class Triangle {
public:
Triangle() = default;
Triangle(const Point& pa, const Point& pb, const Point& pc)
: pa(pa), pb(pb), pc(pc) {}
double area()const {
auto [a, b, c] = sides();
auto p = (a + b + c) / 2.0;
return sqrt(p * (p - a) * (p - b) * (p - c));
}
private:
Point pa;
Point pb;
Point pc;
tuple sides()const {
return { pa.length(pb), pb.length(pc), pc.length(pa) };
}
};

class Command {
public:
Point position()const {
istringstream iss(line);
string g_code;
iss >> g_code;
string pos_x;
iss >> pos_x;
auto x = stod(string{ pos_x.begin() + 1, pos_x.end() });
string pos_y;
iss >> pos_y;
auto y = stod(string{ pos_y.begin() + 1, pos_y.end() });
return { x, y };
}
private:
string line;
friend istream& operator>>(istream& inp, Command& command) {
getline(inp, command.line);
return inp;
}
};

int main() {
Command a, b, c;
cin >> a >> b >> c;
Triangle triangle{ a.position(), b.position(), c.position() };
const auto area = triangle.area();
cout.setf(ios::fixed);
cout.precision(3);
cout
Виктор Бахмат
Виктор Бахмат
58 886
Лучший ответ
Антон Линец На как мне этот ответ занисти в мой ответ?
Антон Линец можешь помочь с другой задачкой?
у меня в профиле пожалуйста если не сложно