if else ternary operator c++ code example
Example 1: c++ short if
(condition) ? (if_true) : (if_false)
Example 2: c++ ternary operator
<condition> ? <true-case-code> : <false-case-code>;
Example 3: ternary operator in c++
(n1 > n2) ? n1 : n2;
OR
n1 > n2 ? n1 : n2;