How to draw a Scalene Triangle in Console with given sides length in C#?

Issue

This Content is from Stack Overflow. Question asked by Amin AmiriDarban

I want to draw a Scalene Triangle in Console, trying with c# language.
We have only the sides length.Imagine the length are AB,BC and AC.
So What is a Algorithm and better if C# code to draw this triangle base on these three given sides.
However, if it is not possible or very hard to say how to draw the triangle with three side, Just draw a triangle by Base Line and Height. So here are the code to calculation of Height and base line in triangle.

 public byte CalculateTriangleBaseLine()
    {
        return new byte[] { SideABLength, SideBCLength, SideACLength }.Max();
    }
 public double CalculateTriangleHeight()
    {
        return Math.Abs((SideABLength + SideBCLength + SideACLength) / 2);
    }



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?