What happens in the MinOfThree program if two or more of the values are equal?If exactly two of the values are equal, does it matter whether the equal values are lower or higher than the third?
What will be an ideal response?
If two or more values are equal, the program still prints the lowest value. Because only less than comparisons are made, the comparison of two equal values produces a false result. If two values are equal, and lower than the third value, then one of the two lower but equal values is printed. If all three values are equal, then this value is printed. Which “version” of the equal value is irrelevant.
If only two values are equal, it does not matter whether the third is lower or higher. The correct result is determined in either case. If the two equal values are lower than the third, then one of the two lower but equal values is printed. If the two equal values are higher than the third, then the third value is printed.
You might also like to view...
The purpose of the ________ element is to contain the main content of a web page document.
a. content b. footer c. div d. main
______ defines the specific location in a webpage where a link leads when triggered.
a. An attribute b. A label c. An anchor d. A trigger