Challenge: Set the Smallest Number to -1
Explore how to write a C++ function that compares two integer variables passed by reference and sets the smallest value to -1. Understand handling equal values and apply conditional statements within functions to manipulate variables effectively.
We'll cover the following...
We'll cover the following...
Problem statement
Your task is to write a function minimum. In the function parameter, you will pass two values of type int by reference, and function will set the smallest number of the two to ...