I am continuing my reading in deitle/deitle. In chapter 3 it is explaining functions to me. My question is why are the parameters named different? This is how it calls the function:
(All the numbers are of type double)
In the function definition, they have it set up like this:Code:cout << maximum ( number1, number2, number3 ) <<endl;
In the function they are not returning x,y or z. They are returning the largest number of number1, number2, and number 3. To me it looks like the function call passes number1, number2, number3 and recieves x,y and z?!?!?Code:double maximum (double x, double y, double z)
My question is, why are the variables in the parameters different? When I read about it, I think they are saying that they are different because of something programmers use called signatures? I am really confused on this one...can anyone help me out?