# How can I better formulate a conditional statement?

To solve optimization problems I have seen this:

Is there a more elegant way to do this with alternative conditional expressions? Is there something equivelant to if, elseif, else that you'd see in Matlab, Maple, RStudio, Ptyhon, etc?

• Are you asking if there's a more elegant version of If[a, b, If[c, d, e]]? Would Which[a, b, c, d, True, e] qualify? – Carl Woll Oct 16 '18 at 17:31
• Which[] and Switch[] would be of interest. Have you seen this? – J. M.'s technical difficulties Oct 16 '18 at 17:33
• In the future please don't post pictures of code. Please. – ktm Oct 16 '18 at 23:31