Homework 5 Solution

Homework 5 Solution - if h<=i and i<=g return g if...

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

View Full Document Right Arrow Icon
Homework Five low (a,b,c): if a<=b and b<=c return a if b<=c and c<=a return b if c<=a and a<=b return c end mid(d,e,f): if d<=e and e<=f return e if e<=f and f<=d return f if f<=d and d<=e return d end high(g,h,i): if g<=h and h<=i return i
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if h<=i and i<=g return g if i<=g and g<=h return h end main: read x, y, z set lowest to low (a,b,c) set middle to mid(d,e,f) set highest to high(g,h,i) print lowest, middle, highest end...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online