- We will be dealing with
*value returning functions* - These are subprograms that return a value to the program that called them.
- They also take 0 or more parameters.
- These are arguments, or things that we pass to the function.
- Example absolute value
- What input does the absolute value function take?
- What does it return?
- The C/C++ function for this is abs
int x,y; x = 8; y = abs(x);

- Arguments must be given in the proper order.
- man abs
- Note, there is the requirement to include another library
*cstdlib*or*stdlib.h* - look at
*fabs*

- Note, there is the requirement to include another library
- Appendix C lists a number of useful functions
- Here is where books can be helpful too.
- cos, sin - sine and cosine of an angle in radians
- pow(x,y) computes x
^{y}, y>0, - abs, labs, fabs
- sqrt

- We will evenutally write our own functions.
- If you have a function that returns nothing, it is called a void function.