Home /
Expert Answers /
Computer Science /
using-heron-39-s-formula-you-can-calculate-the-area-of-a-triangle-if-you-know-the-lengths-of-all-thr-pa115
(Solved): Using Heron's formula, you can calculate the area of a triangle if you know the lengths of all thre ...
Using Heron's formula, you can calculate the area of a triangle if you know the lengths of all three sides. Given the length of each side of a triangle as input, calculate the area of the triangle using Heron's formula as follows: 1. s= half of the triangle's perimeter 2. area = the square root of s∗(s−a)∗(s−b)∗(s−c), where a,b, and c are each sides of the triangle. Hint: Use the sqrt() from math.h to calculate the square root. Output the floating-point value of the area with two digits after the decimal point using the following statement: printf ("Triangle area =∘0.2lf\n", yourValue); Ex: If the input for a,b, and c is: 3.04 .05 .0 the output is: Triangle area =6.00 514712.2789042.qx3zqy7 LAB ACTIVITY 4.7.1: LAB: Area of a triangle 0/10 1 \#include 2 \#include 3 4 int main() \{ main.c Load default template... 5