13.9k views
23 votes
3. Write a Java expression to calculate the area of a triangle, given three sides a, b, c. (Heron's

formula)

User Somalia
by
3.6k points

2 Answers

3 votes

Answer:

I think it is 1/2 b*h

OR

a+b+c

OR

√3/4*a^2

User Sheesh Mohsin
by
3.4k points
7 votes

Answer:

Area = square root of (p*(p-a)*(p-b)*(p-c)) (where p = (a+b+c)/2).

Step-by-step explanation:

According to heron's formula, the area of a triangle with 3 sides a, b and c is,

User Glanden
by
4.3k points