Question #58988

//write a program which reads 2 numbers and then calls a functions
//the function returns the products of 2 numbers supplied to it
// the program will display the result obtained through the function call

Expert's answer

#include <iostream>

using namespace std;

int get_product(int &, int &);

int main() {
int a, b;
cout << "Please, input two numbers\n";
cin >> a >> b;
cout << "The product of this numbers is: " << get_product(a, b) << endl;
return 0;
}

int get_product(int &a, int &b) {
return a * b;
}
LATEST TUTORIALS
APPROVED BY CLIENTS