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
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
Our goal is to make the OpenLab accessible for all users.
Our goal is to make the OpenLab accessible for all users.
Looks good, Benjamin. Please add a name to your procedure at the top of your pseudocode and describe the inputs.