for loop ternary operator c++ code example Example: ternary operator in c++ (n1 > n2) ? n1 : n2; OR n1 > n2 ? n1 : n2;