c# square root of a number code example Example: c# square root function int num = 4; Math.Sqrt(num);