Showing posts with label Calculator. Show all posts
Showing posts with label Calculator. Show all posts

11 May 2012

Use of Functions

Complex problems can usually be broken down into a series of less complex problems, which may themselves be broken down, and so on.
Program design techniques (and programming languages) can accommodate this program approach, to allow the programmer to think about a problem in manageable chunks.

Consider the following pseudocode:
Begin
    Display "Triangle Area Calculator"
    Calculate Area
    Display "Program Complete"
End
The program displays a heading, does a calculation, then displays an end message. The process is quite clear, but the actual calculation process is