Answer to Question #58988 in C++ for Sherlynn

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
1
Expert's answer
2016-04-11T10:21:04-0400
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS