  For a continuous function $f$ defined on a closed and bounded domain, there
is at least one maximum and one minimum. First, we introduce some preliminaries
which are necessary through the paper. We then present an algorithm, which is
similar to the bisection method, to approximate those maximum and minimum
values. We analyze the order of the convergence of the method and the error at
the $k$-th step. Then we discuss the pros and cons of the method. Finally, we
apply our method for some special classes of functions to obtain nicer results.
At the end, we write a Matlab script which implements our algorithm.
