Next: Example
Up: Subroutines
Previous: Subroutines
Contents
Simple Subroutines
Let us consider the previous homework assignment that prints an integer
in binary format. This is a fairly useful piece of code, a program may
want to print several numbers in binary.
With all we know at this point, the only way to print more than one numbers
in binary is to duplicate the code several times. While this approach works,
we will find out that it is not the best method.
Subsections
Tak Auyeung
2003-12-03