Skip to main content

to answer to : int a = (b == 5) ? c : d;int a = (b == 5) ? c : d;

just write :

b=5;c=1;d=2;let a="(b==5)?c:d";echo $a

1

b=6;c=1;d=2;let a="(b==5)?c:d";echo $a

2

b=5 c=1 d=2 let a="(b==5)?c:d" echo $a # 1 b=6; c=1; d=2; let a="(b==5)?c:d" echo $a # 2 

remember that " expression " is equivalent to $(( expression ))

to answer to : int a = (b == 5) ? c : d;

just write :

b=5;c=1;d=2;let a="(b==5)?c:d";echo $a

1

b=6;c=1;d=2;let a="(b==5)?c:d";echo $a

2

remember that " expression " is equivalent to $(( expression ))

to answer to : int a = (b == 5) ? c : d;

just write:

b=5 c=1 d=2 let a="(b==5)?c:d" echo $a # 1 b=6; c=1; d=2; let a="(b==5)?c:d" echo $a # 2 

remember that " expression " is equivalent to $(( expression ))

Source Link

to answer to : int a = (b == 5) ? c : d;

just write :

b=5;c=1;d=2;let a="(b==5)?c:d";echo $a

1

b=6;c=1;d=2;let a="(b==5)?c:d";echo $a

2

remember that " expression " is equivalent to $(( expression ))