Write a function m-file to check whether a triangle is a right triangle given the lengths of its sides, If it is a right triangle, find its area. Otherwise, find its perimeter. This function will take three input parameters.

1 view (last 30 days)
Write a function m-file to check whether a triangle is a right triangle given the lengths of its sides, If it is a right triangle, find its area. Otherwise, find its perimeter. This function will take three input parameters.
Use this function to test the following triangles.
  • (a) 9 ,12 and 13
  • (b)4, 6 and 9
  • (c) 5, 3 and 4

Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!