+ 1
What does it mean?
a < b ? a : b
2 odpowiedzi
+ 4
DarkEye it is ternary operations...
below is syntax for the same :
(condition) ? (code to be executed if condition is true ) : (code to be executed if condition is false)
let me give you example:
int a = 10;
int b = 20;
int c = a<b ? a : b ;
with this, c becomes 10...
if a is 5 and b is 3, c becomes 3
+ 1
okay thank you :)