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.

Computer Science & Information Technology

You might also like to view...

Let a and b be valid boolean expressions. Which of the following best describes the result of the expression a || b?

a) It will evaluate to true if a evaluates to true and b evaluates to true. It will evaluate to false otherwise. b) It will evaluate to false if a evaluates to false and b evaluates to false. It will evaluate to true otherwise. c) It will evaluate to true if a evaluates to false and b evaluates to false. It will evaluate to true otherwise. d) It will evaluate to true if a evaluates to false or b evaluates to false. It will evaluate to true otherwise. e) None of the above statements correctly describes the evaluation of the expression.

Computer Science & Information Technology

In the accompanying figure, item 1 points to the ____________________.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The home page in Internet Explorer 11 is a single webpage or group of tabbed webpages that only loads when the Home button on the Command bar is clicked.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The source-code file and any other files that use a class can include the class’s header file via an _________ preprocessor directive.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology