Problem: Suppose we want to find the smallest number in a given array.
Write an algorithm to solve a given problem in pseudocode.
//input: array of numbers

//output: smallest number in array

min_num = null

for each number in array:
    if min_num is null
        min_num = number
    else if number < min_num
        min_num = number

return min_num;