Kat H.

asked • 07/06/21

C++. Write a function ComputeVal that takes two integer parameters and returns the product of the two parameters minus 8. Ex: ComputeVal(5, 9) returns 37.

C++.


Write a function ComputeVal that takes two integer parameters and returns the product of the two parameters minus 8.


Ex: ComputeVal(5, 9) returns 37.


Code:


#include <iostream>

using namespace std;


/* Your code goes here */


int main() {

int input1, input2;

int result;

cin >> input1;

cin >> input2;

result = ComputeVal(input1, input2);

cout << result << endl;


return 0;

}

1 Expert Answer

By:

Naeem F. answered • 07/06/21

Tutor
5.0 (51)

Senior Software Engineer with 30+ years of experience

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.