I need help trying to create a program?
Hi
I am new to programming and I am struggling trying to create this program using the if solutions here is what I want to create
Produce a program that would calculate the perimeter of the triangle, the area of the triangle and the height of the triangle from the length of the three sides of a triangle. If the three lengths of the sides of the triangle do not define a valid triangle then the user must be notified of this and no calculation will be performed upon this data.
Required maths formula
Heron’s formula:
Area of triangle = SQRT(s(s-a)(s-b)(s-c))
where a, b, c are the three sides, s = (a + b + c)/2 and c is the base of the triangle
Height of the triangle = (Area of triangle)*2/c
Perimeter of triangle = a + b + c
Triangle types:
Scalene – all sides unequal
Isosceles – two sides only equal
Equilateral – all sides equal
Right Angled – one angle of 90 degrees