question archive #include <iostream> using namespace std; void multiplyNumbers(int x, int y, int& product); int main () { int num1 = 10; int num2 = 20; int product = 0; multiplyNumbers(num1, num2,product); // Print value of product before function call cout << "Value of product is: " << product << endl; // Call multiplyNumbers using pass by reference for product // Print value of calculated product cout << num1 << " * " << num2 << " is " << product << endl; return 0; } // End of main function // Write multiplyNumbers function here; use pass by reference for result of multiplication
Subject:Computer SciencePrice: Bought3
#include <iostream>
using namespace std;
void multiplyNumbers(int x, int y, int& product);
int main () {
int num1 = 10;
int num2 = 20;
int product = 0;
multiplyNumbers(num1, num2,product);
// Print value of product before function call
cout << "Value of product is: " << product << endl;
// Call multiplyNumbers using pass by reference for product
// Print value of calculated product
cout << num1 << " * " << num2 << " is " << product << endl;
return 0;
}
// End of main function
// Write multiplyNumbers function here; use pass by reference for result of multiplication. Then use pass by address.
void multiplyNumbers (int x, int y,int &product) {
product = x * y;
return;
}
Take the program you created in Week 5 and place all the functions in a separate class. The class should have at least two constructors.