Question: Write a program to find the area of a triangle , follow these steps: Accept the sides of a triangle in the main. Build a

Write a program to find the area of a triangle , follow these steps:

Accept the sides of a triangle in the main.

Build a function to accept the sides of the triangle (check if the sides form a triangle if yes returns the area otherwise returns zero.

Call the function from the main then print the area of the triangle in the main if the sides form a triangle, if not print sides dont form a triangle.

Let the program find the area for three triangles.

Hint: use this formula to find the triangle area:

Area=Write a program to find the area of a triangle , follow

Hint: use this formula to find the triangle area: Area-Vs(s-a) (s-b) (s-c)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!