One solution would be to loop through the array maintaining the smallest value found in a variable. Another solution would be to first sort the array, then the smallest value would be the first element.