settingsAccountsettings
By using our mini forum, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy
Menusettings

Q: How to calculate square root in C#?

+4 votes
I need to create a console application in C# that calculates and prints the square root of the number 98765
asked in C# category by user Jolie Ann

1 Answer

+2 votes
 
Best answer
using System;

class SquareRootCalculation
{
    static void Main()
    {
        int number = 98765;
        Console.WriteLine(Math.Sqrt(number));
    }
}

OUTPUT:

square root in C#

answered by user eiorgert
edited by user golearnweb
...