Objectives :
- myConditionalOperation1
- A conditional expression
a ? b :c
- operand1 ? operand2 : operand3
int n3 = (n1 < n2 ? n2 : n1);
b1 = n1< n2;
- The sub-expression "n1<n2" which is left to the ? operator,
is evaluated first. If the condition is true, the
Boolean equivalent is 1, then operation n2: will be
performed, and n2 will receive the value of n1.
- code :
myConditionalOperation1.txt
|