Test #1 Review – [Benjamin Lin] section 3.1 #20

Code: Find max and min (a1,a2…..an)
max = min = ai
i = 2

from ( i to n)

if ai < min

min = ai
if ai> max
max = ai
return min, max

This entry was posted in Test #1 Review, Uncategorized. Bookmark the permalink.

1 Response to Test #1 Review – [Benjamin Lin] section 3.1 #20

  1. Kate Poirier says:

    Looks good, Benjamin. Please add a name to your procedure at the top of your pseudocode and describe the inputs.

Leave a Reply

Your email address will not be published. Required fields are marked *