0
C++
this is another way of writing code instead of using nested if else statements. i think the syntax if like this if ( a < b ) { a = b; } else { a = -b; } So please explain to me how it works i dont understand.
1 Réponse
+ 3
use ternary operator
e.g. condition?value if true: value if false
a>b ? a=b : a=-b