How do you transform a number to its sign? [closed]

Why not just do this

int sign = i<=0 ? -1 : 1;

Browse More Popular Posts

Leave a Comment