C# Console General

Finding the Square Root of a Number in C#

In C# the square root of all numbers can calculated  except nagative and decimal numbers.

In this post we will find the square root of numbers using Math.Sqrt and without using Math.Sqrt metod.

Finding Squere root of a number using with Math.Sqrt Method:

 

Finding Squere root of a number using without Math.Sqrt Method:

Note: And if you want to convert square root of a decimal number, you should change double type to decimal.

 

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.