6 Functions
6 Functions
• When a function is called, the program may send values into the
function.
Values that are sent into a function are called arguments.
result = pow(2.0, 4.0);
void displayValue(int num)
{
cout << "The value is " << num << endl;
}
The return Statement
• A function may send a value back to the part of the program that
called the function.
Defining a Value-Returning Function