I have to multiply the sign of all elements in an array. For example 1: Ex2: Ex3: And here is my solution However, the output of ex3 cal([1, -2, 3, 0]) is -0. I’ve already thought about adding one more condition like this And obviously, It looks ugly. Is there a more elegant way to resolve that? Answer In order