#include void calc_wages(int hour, float rate);//note1 void main(void) { int hours_worked; float hourly_rate; cout << "Enter the number of hours worked :"; cin >> hours_worked; cout << "Enter the hourly pay rate :"; cin >> hourly_rate; calc_wages(hours_worked, hourly_rate);//note2 } void calc_wages(int hour, float rate)//note3 { float wage; wage = hour * rate; cout << "The wage is " << wage << endl; } //at note 1: there is the prototype of function calc_wages. // notice that this function has two parameters //at note 2: the function calc_wages is called. the parameters // hours_worked and hourly_rate are passed to the function. // that means that the values in these variables are sent to the function. // the parameters hours_hours and hourly_rate are called "actual parameters" // because these are the values that are actually used when the function is called. //at note 3: we find the function definition. notice that in the function definition, // the parameters names are hours and rate. these parameters(the ones used in // the function definition) are called "formal parameters" because they show the // form the parameters must take. the formal parameters and the actual parameters // don't have the same names, but they must have the same matching types. *** as a general rule, any information that a function needs (as input) should be sent to it via parameters.