. Guys can you help me how can I use the Math.Sqrt in Visual Studio 2008 C# in Windows Application. This is the example output .
Enter the no:
The square root is:
Thank for your help.
Can you help me about Math.sqrt
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Joginder BangerRank #360 · 7K reputationPosted Nov 13, 2014, 7:16 PM EST
Console.WriteLine("Enter the Number:");
Console.WriteLine("The Square Root is:"+ Math.Sqrt(Convert.ToDouble(Console.ReadLine())));
I know where are u confuse Math.Sqrt(place Double type value);
Happy coding
Selva GanapathyRank #560 · 4.3K reputationPosted Nov 13, 2014, 7:07 PM EST
Hi Yuan Lu,
You can Achieve this by using the following Code.
Console.Write("Enter the No : ");
var actualNumber = Convert.ToDouble(Console.ReadLine());
var SqrtNumber = Math.Sqrt(actualNumber);
Console.Write(SqrtNumber.ToString());
Console.Read();
Regards,
Selva Ganapathy K
MahaRank #2,573 · 543 reputationPosted Nov 13, 2014, 8:20 PM EST