Runthetestcases 2convertfromenglishtometric

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 





















 
 T
=

(s(s-a)(s-b)(s-c))½
 Where
s
is
the
semiperimeter
of
the
triangle



s
=
(a+b+c)/2
 
 Test
case
1:

3,
4,
5
 Test
case
2:

12,
12,
12
 
 Write
a
function
called
Heron
that
takes
as
input
three
sides
of
a
triangle
and
returns
as
 output
the
area
and
perimeter.

Run
the
test
cases.
 
 2.

Convert...
View Full Document

This document was uploaded on 03/16/2014 for the course CS 106 at Mt. Holyoke.

Ask a homework question - tutors are online