Text-only Table of Contents (frame/ no frame)
(20) Exercise - Write a function Previous Top Next

Exercise - Write a function M-file



Write a function that has three lengths for its inputs and outputs a string that says if a triangle can or cannot be formed from the lengths provided.

Extra credit: indicate if the triangle is scalene, isosceles or equilateral

Note: A triangle can only be formed if the sum of the two shorter sides is less than the longest side.




Previous Top Next


Exercise_function.src  last modified Oct 17, 2007 Introduction Table of Contents
(frame/no frame)
Printable
(single file)
© Dartmouth College