Question: C++ code only Write a function called setToMin() that will work with the following section of code. It works for any integer variable and will

C++ code only

Write a function called setToMin() that will work with the following section of code. It works for any integer variable and will set it to the lowest of the subsequent three integer parameters. You don't need to put in the prototype, but you need to write a complete function. All the variables are integers.

int x, y, z;

setToMin(x, 1, 4, -6);

// the value of x is now -6

setToMin(y, 4, 2, 8);

// the value of y is now 2

setToMin(z, -9, -8, -7);

// the value of z is now -9

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!