in

Absolute value

Absolute value | ProgrammerHumor.io
Absolute value

Content

public static int Abs(int num) return (num 0) ? -num : num; public static int Abs(int num) int m num 31: return (num m) m; public static int Abs(int num) if (num -1 0) return num -1; else return num; public static int Abs(int num) return (int)Math. Sqrt(Math. Pow(num, 2.0)); public static int Abs(int num) string s num "; 5 s. Replace (‘-‘, string.Empty); return int. Parse (s); ProarammerHumor.io