C#

Find the Sign of a Number in C#

System.Math?class?has?a?Sign?method?that?will?help?you?determine?if?a?number?has?a?negative?sign?or?positive?sign.? //returns?-1? int?negativeNumber??=?System.Math.Sign(-2);? //?returns?1 int?postiveNumber?=?System.Math.Sign(1);? //returns?0 ?int?neutralNumber?=?Math.Sign(0);?

Read More