Answer:
Declare the method prototype using:
void multiplyNumbers(int x, int y,int &product);
Call the function using:
multiplyNumbers(num1, num2,product);
Lastly, the method is as follows:
void multiplyNumbers (int x, int y,int &product) {
product = x * y;
return;
}
Explanation:
Declare the method prototype using
void multiplyNumbers(int x, int y,int &product);
Call the function using
multiplyNumbers(num1, num2,product);
The method is as follows; the & written in front of product implies that product is passed by reference
void multiplyNumbers (int x, int y,int &product) {
This calculate the product
product = x * y;
This returns nothing
return;
}
<em>See attachment for complete program</em>