C++ For Engineers and Scientists: Modularity Using Functions
C++ For Engineers and Scientists: Modularity Using Functions
Chapter 6
Modularity Using Functions
Objectives
• In this chapter, you will learn about:
– Function and parameter declarations
– Returning a single value
– Returning multiple values
– Rectangular to polar coordinate conversion
– Variable scope
– Variable storage categories
– Common programming errors
Figure 6.6 A
function directly
returns at most one
value
Figure 6.9b Replace the first value with the second value