Module: Conditional operator


Problem

3/17

Largest of two numbers - OPTION 2

Theory Click to read/hide

Let's consider the second solution to the problem of finding the maximum of two numbers. 
In the second program, we will first write the maximum value to an additional variable (let's name it Max).

Problem

1. Run the program for execution.
2. Analyze the result and make sure that Max contains the value of A if A > B and Max = B if B > A.
3. Answer the question: what block will be executed if A=B?