public double TriangleSquare(double triangleA, double triangleB, double triangleC)
{
// Вычисление полупериметра.
double halfPerimeter = (triangleA + triangleB + triangleC) / 2;
//Вычисление площади
double squareResult = Math.Sqrt(halfPerimeter * (halfPerimeter - triangleA) * (halfPerimeter - triangleB) * (halfPerimeter - triangleC));
return squareResult;
}