double timesTwo(double num); // function
double number, response;
cout<<"Please enter a number:";
response = timesTwo(number); //function
cout<< "The answer is "<<response;
doubel timesTwo (double num)
double answer; //local variable
answer = 2 * num;
|Notice how the variable
in the function (num)
does not have the same name as the variable sent to the function (number).
It makes no difference what the variables are called, as long as
they are of the same variable type. Variables are used in the order
in which they are sent to the function.