Update 6-6.cpp

When a function is called, the program may send values into the function.
Values that are sent into a function are called arguments. You’re already familiar with how
to use arguments in a function call. In the following statement the function pow is being
called with two arguments, 2.0 and 4.0 passed to it:
result = pow(2.0, 4.0);
Using Function
Arguments
A parameter is a special variable that holds a value being passed as an argument into a
function. By using parameters, you can design your own functions that accept data this
way. Here is the definition of a function that uses a parameter:
void displayValue(int num)
{
cout << "The value is " << num << endl;
}
Notice the integer variable definition inside the parentheses (int num) . The variable num
is a parameter. This enables the function displayValue to accept an integer value as an
argument. Program 6-6 is a complete program that uses this function.