The advantages of splitting a program up in multiple functions are:
- Most programs have some basic functionality that is needed in multiple places. Having that functionality in a separate function means it is more obvious when that same functionality is used and you also only have to fix problems with it only once.
- By splitting a program in functions, you can introduce multiple levels of abstraction in the code. In the main function you get a broad overview of what the program does and each level down on the call-tree reveals more details how certain aspects are realized.