In this program, You will learn how to find the square root of a number in C#.
Math.Sqrt(num);
using System;
public class Program
{
public static void Main(string[] args)
{
int x;
Console.Write("Enter a number:");
x = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Square root is:" + Math.Sqrt(x));
}
}
Enter a number:49
Square root is:7