ternary cpp code example
Example 1: c++ ternary operator
<condition> ? <true-case-code> : <false-case-code>;
Example 2: ternary operator in c++
(n1 > n2) ? n1 : n2;
OR
n1 > n2 ? n1 : n2;
<condition> ? <true-case-code> : <false-case-code>;
(n1 > n2) ? n1 : n2;
OR
n1 > n2 ? n1 : n2;