A fundamental approach to solving large, complex problems is to break the problem down into smaller
subproblems. Then, solutions can be found for these smaller problems and organized in such a manner
as to address the original problem. In a similar way, problems that require long, complex Fortran
code can be broken down into program units. In addition to the main program unit beginning with
program, Fortran programs can contain many subprograms. Subprograms allow
the programmer to organize their code in a logical, hierarchical fashion. The Fortran language
provides for two types of subprograms: functions and subroutines.