. 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.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Joginder BangerPosted Nov 14, 2014, 12:16 AM
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
MahaPosted Nov 14, 2014, 1:20 AM
Selva GanapathyPosted Nov 14, 2014, 12:07 AM
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